Skip to content

Commit 9bd9e18

Browse files
fvsnippetsFederico Valido
authored and
Federico Valido
committed
Limit max execution time (i.e. timeout) to 29 seconds for Backend Image Handler Lambda Function since Api Gateway on front has that limitation.
1 parent 29fe1e7 commit 9bd9e18

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

source/constructs/lib/back-end/back-end-construct.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export class BackEnd extends Construct {
8989
description: `${props.solutionName} (${props.solutionVersion}): Performs image edits and manipulations`,
9090
memorySize: 1024,
9191
runtime: Runtime.NODEJS_16_X,
92-
timeout: Duration.minutes(15),
92+
timeout: Duration.seconds(29),
9393
role: imageHandlerLambdaFunctionRole,
9494
entry: path.join(__dirname, "../../../image-handler/index.ts"),
9595
environment: {

source/constructs/test/__snapshots__/constructs.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1205,7 +1205,7 @@ exports[`Serverless Image Handler Stack Snapshot 1`] = `
12051205
"Value": "S0ABC",
12061206
},
12071207
],
1208-
"Timeout": 900,
1208+
"Timeout": 29,
12091209
},
12101210
"Type": "AWS::Lambda::Function",
12111211
},

0 commit comments

Comments
 (0)