Skip to content

Commit

Permalink
Limit max execution time (i.e. timeout) to 29 seconds for Backend Ima…
Browse files Browse the repository at this point in the history
…ge Handler Lambda Function since Api Gateway on front has that limitation.
  • Loading branch information
Federico Valido committed Jul 6, 2022
1 parent b6a4f88 commit 3e8413c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/constructs/lib/back-end/back-end-construct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class BackEnd extends Construct {
description: `${props.solutionDisplayName} (${props.solutionVersion}): Performs image edits and manipulations`,
runtime: Runtime.NODEJS_14_X,
handler: 'image-handler/index.handler',
timeout: Duration.minutes(15),
timeout: Duration.seconds(29),
memorySize: 1_024,
code: Code.fromBucket(sourceCodeBucket, [props.sourceCodeKeyPrefix, 'image-handler.zip'].join('/')),
role: imageHandlerLambdaFunctionRole,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,7 @@ Object {
"Value": "S0ABC",
},
],
"Timeout": 900,
"Timeout": 29,
},
"Type": "AWS::Lambda::Function",
},
Expand Down

0 comments on commit 3e8413c

Please sign in to comment.