
Answer-first summary for fast verification
Answer: Create an Amazon Simple Queue Service (Amazon SQS) FIFO queue to hold messages. Set up an AWS Lambda function to process messages from the queue.
## Explanation **Correct Answer: A** **Why Option A is correct:** 1. **FIFO (First-In-First-Out) queue** maintains the exact order of messages, which is critical for this requirement where "data is written in a specific order that must be maintained throughout processing." 2. **AWS Lambda integration** with SQS provides a serverless, event-driven processing model that minimizes operational overhead. 3. **SQS FIFO queues** guarantee exactly-once processing and preserve the order of messages, making them ideal for ordered data processing scenarios. 4. **Minimal operational overhead** is achieved through the serverless nature of Lambda and managed service nature of SQS. **Why other options are incorrect:** **Option B (SNS + Lambda):** - SNS topics do not guarantee message ordering. Messages can be delivered to subscribers in any order. - While Lambda can process messages, the lack of ordering guarantee makes this unsuitable for the requirement. **Option C (SQS Standard Queue + Lambda):** - Standard SQS queues provide best-effort ordering but do NOT guarantee FIFO ordering. - Messages might be delivered out of order, violating the requirement for maintaining specific order. **Option D (SNS + SQS):** - While this adds durability through SQS, SNS still doesn't guarantee ordering of messages. - The SQS queue would receive messages in potentially random order from SNS. - This adds unnecessary complexity without solving the ordering requirement. **Key AWS Concepts:** - **SQS FIFO queues** are specifically designed for scenarios requiring strict message ordering and exactly-once processing. - **AWS Lambda** with SQS event source mapping automatically scales to process messages and handles retries on failures. - This combination provides a fully managed, serverless solution with minimal operational overhead while meeting the ordering requirement.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A company has a service that produces event data. The company wants to use AWS to process the event data as it is received. The data is written in a specific order that must be maintained throughout processing. The company wants to implement a solution that minimizes operational overhead.
How should a solutions architect accomplish this?
A
Create an Amazon Simple Queue Service (Amazon SQS) FIFO queue to hold messages. Set up an AWS Lambda function to process messages from the queue.
B
Create an Amazon Simple Notification Service (Amazon SNS) topic to deliver notifications containing payloads to process. Configure an AWS Lambda function as a subscriber.
C
Create an Amazon Simple Queue Service (Amazon SQS) standard queue to hold messages. Set up an AWS Lambda function to process messages from the queue independently.
D
Create an Amazon Simple Notification Service (Amazon SNS) topic to deliver notifications containing payloads to process. Configure an Amazon Simple Queue Service (Amazon SQS) queue as a subscriber.