AWS Certified Solutions Architect - Professional / Question #629 of 529

Question #629

A company's e-commerce platform experiences prolonged delays during peak traffic due to synchronous calls to a third-party payment gateway. The current architecture directly invokes an AWS Fargate task for each transaction, leading to bottlenecks and failed payments. A solutions architect must decouple the payment processing system and ensure all transactions are eventually processed without dropping requests. Which solution meets these requirements?

A

Use an Amazon Simple Queue Service (Amazon SQS) queue to buffer payment requests and asynchronously trigger the Fargate tasks.

B

Use an AWS Step Functions state machine to orchestrate the payment processing workflow with the Fargate tasks.

C

Use an Amazon EventBridge rule to schedule the Fargate tasks for processing payment requests.

D

Use an Amazon Simple Notification Service (Amazon SNS) topic to fan out payment requests to multiple Fargate tasks.

Explanation

Answer A is correct because Amazon SQS provides a reliable queue to buffer payment requests, decoupling the frontend from the payment processing backend. During peak traffic, requests are stored in the queue, and Fargate tasks process them asynchronously, scaling as needed. This eliminates synchronous delays and ensures no requests are lost.

Other options are less suitable:
- B (Step Functions) adds orchestration complexity without solving the core decoupling issue.
- C (EventBridge) schedules tasks but doesn't handle real-time request buffering.
- D (SNS) fans out messages but lacks built-in queuing, risking duplicate processing.

Key Points:
1. Decoupling via queues (SQS) handles traffic spikes.
2. Asynchronous processing ensures eventual consistency.
3. SQS guarantees message durability and exactly-once delivery.

Answer

The correct answer is: A