A payment processing application runs on AWS Lambda in private subnets across multiple Availability Zones. The application uses multiple Lambda functions and processes millions of transactions daily. The architecture must prevent duplicate payments. Which solution meets this requirement?
Choose an answer
Tap an option to check your answer.
Correct answer: Use Lambda to retrieve all due payments. Publish the due payments to an Amazon Simple Queue Service (Amazon SQS) FIFO queue. Configure another Lambda function to poll the FIFO queue and to process the due payments..
Why this is the answer
The correct answer is using an Amazon SQS FIFO (First-In, First-Out) queue. FIFO queues guarantee message ordering and support exactly-once processing, which is crucial for preventing duplicate payments. When a message is successfully processed, it can be deleted from the queue, ensuring it's not processed again. The other options are less suitable: Publishing to an Amazon S3 bucket with event notifications doesn't guarantee exactly-once processing or order, potentially leading to duplicates. A standard Amazon SQS queue doesn't guarantee message ordering or exactly-once processing, making duplicate payments possible. Storing in an Amazon DynamoDB table with streams also doesn't inherently prevent duplicate processing without additional complex logic to track processed items, and streams don't guarantee exactly-once delivery for downstream consumers in the same way SQS FIFO does.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed