Description
Describe the bug
Backend Image Handler Lambda Function construct (CDK) has a timeout of timeout: Duration.minutes(15)
.
It makes no sense to continue executing the lambda after 29 seconds since Api Gateway on front will have replied to CloudFront with a 504 status code (Gateway Timeout).
Notice: read about Api Gateway integrations limits with Lambda.
To Reproduce
Time to time (not frequent... Sometimes it takes days or weeks to see this happens) I experience long delays in receiving the response from S3 (the reason is unknown to me, I didn't investigate, but I guess it's irrelevant to this bug report). This in turn causes Lambda to take more than 29 seconds to respond to the Api Gateway's requet.
Expected behavior
After 29 seconds, Lambda engine timeouts execution.
Backend Image Handler Lambda Function construct (CDK) configured with timeout: Duration.seconds(29)
.
Please complete the following information about the solution:
- Version: v6.0.0