AWS Certified DevOps Engineer – ProfessionalResilient Cloud SolutionsMedium
A financial services company is building a new application that processes high-volume, real-time financial transactions. The application uses Amazon EC2 instances in an Auto Scaling group behind an Application Load Balancer. Due to strict regulatory compliance, the application must ensure that every transaction is processed exactly once, even during scaling events or instance failures. Which AWS service or feature should be used to guarantee exactly-once processing for these transactions?
- AAmazon SQS Standard Queue
- BAmazon SQS FIFO Queue
- CAmazon DynamoDB with conditional writes
- DAmazon Kinesis Data Streams
Show answer & explanationAnswer & explanation
Correct answer: B. Amazon SQS FIFO Queue
Amazon SQS FIFO (First-In, First-Out) queues guarantee that messages are processed exactly once and in the exact order they are sent, which is crucial for financial transactions requiring strict compliance and preventing duplicate processing.
Why the other options are wrong
- A. Amazon SQS Standard Queues offer at-least-once delivery and do not guarantee message order, making them unsuitable for exactly-once processing of financial transactions.
- C. Amazon DynamoDB with conditional writes can be used to implement idempotency at the application level, but it's a mechanism for ensuring exactly-once behavior within the application logic, not a messaging service feature itself.
- D. Amazon Kinesis Data Streams can ensure ordered processing per shard but does not inherently guarantee exactly-once processing without additional application-level logic for idempotency.
Amazon SQS FIFO Queue
A type of Amazon SQS queue that guarantees message ordering and exactly-once processing.
- Messages are delivered in the exact order they are sent.
- Messages are processed exactly once.
- Supports message deduplication.
- Higher throughput limits than standard queues (with batching).
Memory trick: Order First, Only Once.