Interview practice question
SQS messages processed twice
Data Engineering · AWS Lambda · Beginner
Your SQS-triggered Lambda sometimes processes the same message twice. Why, and how do you fix it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- SQS standard queues are at-least-once.
- If processing takes longer than the visibility timeout, the message becomes visible again.
- Whole-batch failure causes successful messages to be retried.
- Set visibility timeout longer than function timeout and use partial batch responses.
- Make processing idempotent.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.