Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

SNS event's new SqsSubscription option does not follow recommended configuration #1209

Closed
ljacobsson opened this issue Oct 16, 2019 · 1 comment

Comments

@ljacobsson
Copy link
Contributor

When setting SqsSubscription: true on an SNS event, SAM will put a queue without any properties set in front of the lambda function.

According to AWS docs, the VisibilityTimeout should be set to give lambda's retry logic a chance to retry twice before the message becomes available:

https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html

To allow your function time to process each batch of records, set the source queue's visibility timeout to at least 6 times the timeout that you configure on your function. The extra time allows for Lambda to retry if your function execution is throttled while your function is processing a previous batch.

Would also be nice if there were optional properties to build a redrivePolicy and a DLQ so messages don't retry relentlessly for 4 days.

@jlhood
Copy link
Contributor

jlhood commented Oct 16, 2019

@ljacobsson Thanks for bringing this up. The current SqsSubscription: true feature was part of the solution proposed in #854. There is additional work to do to support further configuration of SQS, but it should be tracked under that issue. You bring up a good point though that SAM should allow use cases where more advanced SQS queue configuration is needed. I'll update #854 with this additional requirement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants