Skip to content

Commit 3e8413c

Browse files
author
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 b6a4f88 commit 3e8413c

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
@@ -63,7 +63,7 @@ export class BackEnd extends Construct {
6363
description: `${props.solutionDisplayName} (${props.solutionVersion}): Performs image edits and manipulations`,
6464
runtime: Runtime.NODEJS_14_X,
6565
handler: 'image-handler/index.handler',
66-
timeout: Duration.minutes(15),
66+
timeout: Duration.seconds(29),
6767
memorySize: 1_024,
6868
code: Code.fromBucket(sourceCodeBucket, [props.sourceCodeKeyPrefix, 'image-handler.zip'].join('/')),
6969
role: imageHandlerLambdaFunctionRole,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,7 @@ Object {
11631163
"Value": "S0ABC",
11641164
},
11651165
],
1166-
"Timeout": 900,
1166+
"Timeout": 29,
11671167
},
11681168
"Type": "AWS::Lambda::Function",
11691169
},

0 commit comments

Comments
 (0)