From cc13948d3be52abbd230d13221a7f7beba153e6b Mon Sep 17 00:00:00 2001 From: Daan Rademaker Date: Mon, 27 Nov 2023 14:38:55 +0100 Subject: [PATCH] default name is generated by id, or can be provided in props --- typescript/src/resources/deploy-lambda.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/typescript/src/resources/deploy-lambda.ts b/typescript/src/resources/deploy-lambda.ts index 1d790050..3c9e8029 100644 --- a/typescript/src/resources/deploy-lambda.ts +++ b/typescript/src/resources/deploy-lambda.ts @@ -46,6 +46,7 @@ export interface CustomDeployLambdaProps { readonly databricksPassParam?: string readonly databricksAccountParam?: string readonly lambdaCode?: aws_lambda.DockerImageCode + readonly lambdaName?: string } export abstract class IDatabricksDeployLambda extends Construct { @@ -318,8 +319,8 @@ export class DatabricksDeployLambda extends IDatabricksDeployLambda { ] })); - this.lambda = new aws_lambda.DockerImageFunction(this, "Lambda", { - functionName: "DatabricksDeploy", + this.lambda = new aws_lambda.DockerImageFunction(this, `${id}Lambda`, { + functionName: this.props.lambdaName, code: dockerImageCode, timeout: Duration.seconds(300), role: this.lambdaRole,