cdk-nag
cdk-nag copied to clipboard
feat: add rule LambdaEventSourceSQSVisibilityTimeout
Fixes #1798
New rule for "SQS queue visibility timeout of Lambda Event Source Mapping is at least 6 times timeout of Lambda function". Helps prevent configurations resulting in duplicate processing of queue items due to visibility timeout being too low
Recommendation in the SQS docs:
To allow your function time to process each batch of records, set the source queue's visibility timeout to at least six times the timeout that you configure on your function. The extra time allows for Lambda to retry if your function is throttled while processing a previous batch.