Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Specify Visibility Timeout for SQS other than 6 * function timeout #361

Open
johncourt opened this issue Sep 25, 2023 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@johncourt
Copy link

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:

constructs:
    my-queue:
        # ...
        worker:
            handler: src/worker.handler
            memorySize: 512
            timeout: 10

Implementation Idea

Add an attribute called queueTimeout which overrides the default 6 * worker timeout behaviour

@johncourt johncourt added the enhancement New feature or request label Sep 25, 2023
@johncourt
Copy link
Author

Great project by the way - avoids a significant limitation with serverless

@tampueroc
Copy link

tampueroc commented Dec 6, 2023

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:

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants