Skip to content

Commit

Permalink
Merge pull request #1067 from DaanRademaker/overwrite_lambda_id_deplo…
Browse files Browse the repository at this point in the history
…ylambda_with_props

all overwrite of lambdaId for backwards compatibility
  • Loading branch information
DaanRademaker authored May 27, 2024
2 parents ca37152 + c2a39fa commit 90aa5b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion typescript/src/resources/deploy-lambda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export interface CustomDeployLambdaProps {
readonly databricksAccountParam?: string
readonly lambdaCode?: aws_lambda.DockerImageCode
readonly lambdaName?: string
readonly lambdaId?: string
}

export abstract class IDatabricksDeployLambda extends Construct {
Expand Down Expand Up @@ -327,7 +328,8 @@ export class DatabricksDeployLambda extends IDatabricksDeployLambda {
]
}));

this.lambda = new aws_lambda.DockerImageFunction(this, `${id}Lambda`, {
const lambdaId = this.props.lambdaId || `${id}Lambda`;
this.lambda = new aws_lambda.DockerImageFunction(this, lambdaId, {
functionName: this.props.lambdaName,
code: dockerImageCode,
timeout: Duration.seconds(300),
Expand Down

0 comments on commit 90aa5b9

Please # to comment.