Open johncourt opened 1 year ago
Great project by the way - avoids a significant limitation with serverless
You can configure the SQS Queue VisibilityTimeout Property by adding it as an extension on the construct!
constructs:
my-queue:
type: queue
worker:
handler: src/worker.handler
extensions:
queue:
Properties:
VisibilityTimeout: 43200 # 12 Hours
Sources:
Start from the Use-case
SQS allows visibility timeout up to 12 hours.
To achieve this I need to set the worker timeout to 2 hours so lift can calculate 6 * 2 = 12 hours. But I want my lambda to time out after a few seconds not 2 hours, wait 12 hours and try again.
Example Config
From the docs:
Implementation Idea
Add an attribute called queueTimeout which overrides the default 6 * worker timeout behaviour