mediummultiple choiceObjective-mapped

Exhibit

Amazon SQS queue
  QueueName: payments-standard
  QueueType: Standard
  VisibilityTimeout: 120 seconds
Worker logs
  14:01:10 Received messageId=msg-4412 orderId=4412
  14:03:09 Charged customer card successfully
  14:03:10 Lambda timed out before DeleteMessage completed
  14:03:35 Same message received again and charged a second time
Business requirement
  A payment must never be charged twice even if a message is delivered again.

Based on the exhibit, the payment worker sometimes processes the same SQS Standard message more than once after a timeout. What change best prevents duplicate charges while keeping the queue architecture?

Question 1mediummultiple choice
Full question →

Based on the exhibit, the payment worker sometimes processes the same SQS Standard message more than once after a timeout. What change best prevents duplicate charges while keeping the queue architecture?

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

Increase the SQS visibility timeout to 15 minutes and leave the worker unchanged.

A longer visibility timeout can reduce the chance of a duplicate becoming visible too early, but it does not guarantee correctness. A retry, function timeout, worker crash, or later redelivery can still cause a second charge if the business operation itself is not protected.

B

Distractor review

Replace the Standard queue with a FIFO queue and rely only on message ordering.

FIFO queues help with ordering and can reduce duplicate delivery within a deduplication window, but they do not make an external payment call exactly once by themselves. The application still needs to protect the side effect.

C

Best answer

Make the payment workflow idempotent by recording a unique order key before charging.

SQS Standard queues are at-least-once delivery, so duplicate messages are always possible. The correct safeguard is idempotency: store a unique order or payment request key, check whether that key has already been processed, and only perform the charge the first time it is seen. Any later delivery is safely ignored.

D

Distractor review

Add a second consumer so duplicate messages are processed faster.

More consumers improve throughput but do not prevent duplicate side effects. Without idempotency, additional consumers can actually increase the chance of race conditions and repeated charges.

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: Make the payment workflow idempotent by recording a unique order key before charging. — The right fix is to make the payment operation idempotent. SQS Standard queues provide at-least-once delivery, which means a message can be delivered more than once even when the queue is healthy. By recording a unique business key before charging, the worker can detect a repeated request and skip the second charge. This preserves the queue design while protecting the financial transaction. Why others are wrong: A longer visibility timeout only reduces retries; it does not guarantee exactly-once processing. FIFO improves ordering but does not eliminate duplicate side effects from external systems. Adding consumers affects throughput, not correctness.

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.