Question 565 of 1,040
Design Resilient ArchitecturesmediumMultiple ChoiceObjective-mapped

SAA-C03 Idempotency Practice Question

This SAA-C03 practice question tests your understanding of design resilient architectures. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. A key principle to apply: idempotency. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

An orders service publishes payment instructions to an Amazon SQS queue. The downstream consumer sometimes times out while processing a message. After the message becomes visible again, the consumer may process the same instruction more than once and occasionally creates duplicate orders. The team needs a resiliency-focused design that prevents duplicates from creating double-charges, even if the same message is processed multiple times. What is the best architectural change?

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 by using an idempotency key from the payment instruction (for example, a unique transaction/payment ID) and storing processing results with conditional writes so repeated deliveries do not create a second order.

Option B is correct because making the consumer idempotent ensures that processing the same payment instruction multiple times does not result in duplicate orders or double charges. By using a unique idempotency key (e.g., transaction ID) and conditional writes (e.g., DynamoDB conditional put or database INSERT ... ON CONFLICT DO NOTHING), the consumer can safely handle repeated message deliveries without side effects. This directly addresses the resiliency requirement without relying on SQS guarantees, which standard queues do not provide for exactly-once delivery.

Key principle: Idempotency

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Rely on SQS to guarantee exactly-once delivery for standard queues and remove all duplicate-handling logic in the consumer.

    Why it's wrong here

    Standard SQS provides at-least-once delivery, not exactly-once. Duplicates can occur due to retries after timeouts, crashes, or visibility timeouts. Removing duplicate handling increases the chance of double-charging.

  • Make the consumer idempotent by using an idempotency key from the payment instruction (for example, a unique transaction/payment ID) and storing processing results with conditional writes so repeated deliveries do not create a second order.

    Why this is correct

    Because standard SQS is at-least-once, duplicates are expected under failure scenarios. The resilient approach is to ensure the side effect is performed only once by implementing idempotency. Store a record keyed by a payment/instruction ID using conditional logic (for example, a database conditional put/update or a transaction with a uniqueness constraint). If the key already exists, the consumer should treat the message as already processed and avoid creating a duplicate order/charge.

    Related concept

    Idempotency

  • Increase the SQS visibility timeout to the maximum value so the consumer never retries the message.

    Why it's wrong here

    A longer visibility timeout reduces retry frequency but cannot guarantee that the consumer will finish processing within the timeout. If processing still exceeds the visibility timeout, the message will be delivered again and duplicates can still occur.

  • Change the queue to SNS with a fan-out subscription so each consumer gets a separate copy, ensuring processing is sequential and duplicate-free.

    Why it's wrong here

    SNS fan-out does not provide exactly-once semantics. Multiple deliveries and duplicate side effects can still occur, and sequential/duplicate-free processing is not guaranteed by SNS itself.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates assume SQS FIFO queues or increased visibility timeouts solve duplicates, but the question specifically tests the concept of idempotency as the correct resiliency pattern for at-least-once delivery systems.

Detailed technical explanation

How to think about this question

Idempotency is typically implemented by storing the idempotency key (e.g., a UUID from the payment instruction) in a database with a unique constraint or using a conditional write (e.g., DynamoDB PutItem with ConditionExpression: attribute_not_exists(pk)). If the key already exists, the write is rejected, preventing duplicate order creation. This pattern is resilient even with SQS's at-least-once delivery and consumer timeouts, as the second attempt will simply retrieve the existing result rather than reprocessing.

KKey Concepts to Remember

  • Idempotency
  • At-least-once delivery
  • Idempotency key
  • Conditional writes

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Idempotency

Real-world example

How this comes up in practice

A cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. Idempotency Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.

What to study next

Got this wrong? Here's your next step.

Review idempotency, then practise related SAA-C03 questions on the same topic to reinforce the concept.

Related practice questions

Related SAA-C03 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free SAA-C03 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this SAA-C03 question test?

Design Resilient Architectures — This question tests Design Resilient Architectures — Idempotency.

What is the correct answer to this question?

The correct answer is: Make the consumer idempotent by using an idempotency key from the payment instruction (for example, a unique transaction/payment ID) and storing processing results with conditional writes so repeated deliveries do not create a second order. — Option B is correct because making the consumer idempotent ensures that processing the same payment instruction multiple times does not result in duplicate orders or double charges. By using a unique idempotency key (e.g., transaction ID) and conditional writes (e.g., DynamoDB conditional put or database INSERT ... ON CONFLICT DO NOTHING), the consumer can safely handle repeated message deliveries without side effects. This directly addresses the resiliency requirement without relying on SQS guarantees, which standard queues do not provide for exactly-once delivery.

What should I do if I get this SAA-C03 question wrong?

Review idempotency, then practise related SAA-C03 questions on the same topic to reinforce the concept.

What is the key concept behind this question?

Idempotency

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Keep practising

More SAA-C03 practice questions

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.