easymultiple choiceObjective-mapped

A system processes events from Amazon SQS and sometimes sees duplicate messages due to retries. The business requirement is that each payment must be charged at most once. What design choice best addresses this resiliency requirement?

Question 1easymultiple choice
Full question →

A system processes events from Amazon SQS and sometimes sees duplicate messages due to retries. The business requirement is that each payment must be charged at most once. What design choice best addresses this resiliency requirement?

Answer choices

Why each option matters

Good practice is not just finding the correct option. The wrong answers often show the exact trap the exam wants you to fall into.

A

Distractor review

Assume duplicates never occur because the consumer deletes messages immediately after receiving them.

With SQS at-least-once delivery, duplicates can still occur if processing fails, times out, or crashes before the delete occurs. Even if you delete quickly after receiving, failures after the side effect can still lead to duplicates being delivered later.

B

Best answer

Implement idempotent processing using a deduplication key (for example, paymentId) and record completed charges so duplicates are safely ignored.

Idempotency ensures at-most-once side effects even when duplicates are delivered. Persist a record keyed by paymentId (e.g., a unique constraint/conditional write). If the record indicates the payment was already charged, skip the charge for any subsequent duplicate message.

C

Distractor review

Increase the SQS visibility timeout until duplicates never happen.

Changing visibility timeout only affects when messages are retried. It does not change SQS’s delivery semantics or guarantee that duplicates will never be delivered, nor does it prevent duplicate side effects from being executed.

D

Distractor review

Use SNS topics instead of SQS so retries are disabled by default.

Switching to SNS does not guarantee exactly-once processing for downstream systems. Duplicate notifications and retries can still occur due to delivery failures and subscriber behavior, so idempotency is still required to enforce at-most-once charging.

Common exam trap

Common exam trap: NAT rules depend on direction and matching traffic

NAT is not only about the public address. The inside/outside interface roles and the ACL or rule that matches traffic are just as important.

Technical deep dive

How to think about this question

NAT questions usually test address translation, overload/PAT behaviour, static mappings and whether the right traffic is being translated. Read the interface direction and address terms carefully.

KKey Concepts to Remember

  • Static NAT maps one inside address to one outside address.
  • PAT allows many inside hosts to share one public address using ports.
  • Inside local and inside global describe the private and translated addresses.
  • NAT ACLs identify traffic for translation, not always security filtering.

TExam Day Tips

  • Identify inside and outside interfaces first.
  • Check whether the scenario needs static NAT, dynamic NAT or PAT.
  • Do not confuse NAT matching ACLs with normal packet-filtering intent.

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.

More questions from this exam

Keep practising from the same exam bank, or move into a focused topic page if this question exposed a weak area.

FAQ

Questions learners often ask

What does this SAA-C03 question test?

Static NAT maps one inside address to one outside address.

What is the correct answer to this question?

The correct answer is: Implement idempotent processing using a deduplication key (for example, paymentId) and record completed charges so duplicates are safely ignored. — Implement idempotent processing. Because SQS is at-least-once, a message can be delivered more than once (for example, if the consumer crashes after charging but before deleting the message). To ensure each payment is charged at most once, use an idempotency key such as paymentId and persist an indicator of completion in a datastore that supports safe uniqueness (for example, a unique constraint in a relational database or a conditional write in a key-value store). When the same paymentId is received again, the consumer skips the charge operation. At-least-once delivery means duplicates can still appear depending on failures and the timing of deletes/acknowledgements. Increasing visibility timeout changes retry timing but does not eliminate duplicates or prevent duplicate side effects. Replacing SQS with SNS does not inherently provide exactly-once end-to-end behavior for payment charging.

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

Then try more questions from the same exam bank and focus on understanding why the wrong options are tempting.

Discussion

Loading comments…

Sign in to join the discussion.