Our Lambda function processes SQS messages that usually finish in under a minute, but a small number take several minutes when a downstream service is slow. We’ve seen occasional duplicate processing and are reviewing the queue’s visibility timeout.
How are people choosing that timeout relative to Lambda’s maximum execution time and their retry strategy? I know a longer timeout can delay recovery from a failed invocation, while a shorter one risks another consumer picking up a message that is still being handled. What signals or failure patterns should guide the setting?
Can you answer this question?
Write Answer0 Answers