SAA-C03 Design Resilient Architectures Practice Question
An orders service publishes payment instructions to an Amazon SQS queue. After occasional processing timeouts, the downstream consumer sometimes processes the same instruction twice, resulting in duplicate payment attempts. The team currently uses an SQS Standard queue with a visibility timeout of 2 minutes and relies on the consumer to finish before the timeout expires. What approach best improves resilience against duplicate processing?
⚠ Common exam trap
Candidates often think reducing the visibility timeout or adding a DLQ alone solves duplicates, but they overlook that Standard queues inherently allow at-least-once delivery, so idempotency is the only reliable solution.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Make the consumer idempotent using the order ID as a deduplication key, and set the visibility timeout longer than the worst-case processing time.
Making the consumer idempotent using the order ID as a deduplication key ensures that even if the same message is processed multiple times, the downstream system will only apply the payment once. Setting the visibility timeout longer than the worst-case processing time prevents the message from becoming visible again before the consumer finishes, eliminating the root cause of duplicate processing in a Standard queue.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Decrease visibility timeout to 10 seconds so duplicates are less likely to occur.
Why it's wrong here
Decreasing the visibility timeout to 10 seconds increases the chance that a message becomes visible again while the original consumer is still processing it. When the timeout expires, SQS redelivers the message, so a consumer that hasn't yet called DeleteMessage will receive the same message again, resulting in duplicate payments. This is the opposite of reducing duplicates; the visibility timeout must be longer than the worst-case processing time to prevent premature redelivery.
- ✓
Make the consumer idempotent using the order ID as a deduplication key, and set the visibility timeout longer than the worst-case processing time.
Why this is correct
SQS Standard provides at-least-once delivery, so duplicates can still occur. The most resilient design is to make the payment handler idempotent so repeated deliveries do not create duplicate side effects, and to set the visibility timeout long enough to cover the worst-case processing time to reduce unnecessary re-delivery.
- ✗
Use an EventBridge rule with a fixed retry policy that only retries when the payload matches exactly.
Why it's wrong here
EventBridge is not part of the SQS delivery path here, and its retry policy does not alter SQS's at-least-once semantics. Even if you attached an EventBridge rule to the queue, the same message can still be delivered more than once after a visibility timeout or network glitch; a payload-match condition won't catch SQS redeliveries because the payload is identical. The only reliable way to avoid duplicate side effects is to make the consumer idempotent, not to rely on a retry policy in a different service.
- ✗
Enable a dead-letter queue (DLQ) only, without changing the queue type or consumer logic.
Why it's wrong here
A dead-letter queue only stores messages that exceed a configured receive count after repeated failed processing attempts; it does nothing for messages that are successfully processed multiple times. Duplicate payments happen when the same message is delivered again and the consumer performs the action again, which is a normal successful invocation in the DLQ's view. Thus, enabling a DLQ without making the consumer idempotent or adjusting visibility timeouts leaves the duplicate problem completely unaddressed.
Go deeper
Related to this question
About these practice questions
One of 935 original SAA-C03 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This SAA-C03 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SAA-C03 exam.