Q81 — AWS SAA-C03 Ch.16

Question 81 of 100 | ← Chapter 16

Q1281. 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?

Correct Answer: 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.

Explanation

The correct solution must ensure that event data is processed in the exact order it is received while minimizing operational overhead. Let's evaluate each option:Correct Answer: 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.Why Option A is Best:Strict Message Ordering:SQS FIFO queues guarantee first-in-first-out (FIFO) delivery, ensuring messages are processed in the exact order they were sent.Serverless & Low Overhead:AWS Lambda automatically scales with the queue and requires no infrastructure management (unlike EC2 or ECS).Built-in Retries & Dead-Letter Queues (DLQ):If processing fails, Lambda retries the message (configurable up to 2 retries by default), and failed messages can be moved to a DLQ for analysis.No Additional Components Needed:Unlike SNS-based solutions (B, D), this approach does not require extra subscriptions or topic configurations.Why Other Options Fail:B. Create an Amazon SNS topic to deliver notifications containing payloads to process. Configure an AWS Lambda function as a subscriber.No Ordering Guarantee:SNS delivers messages in parallel to multiple subscribers (if configured), and Lambda may process them out of order if multiple invocations occur simultaneously. C. Create an Amazon SQS standard queue to hold messages. Set up an AWS Lambda function to process messages from the queue independently.Standard Queue Ordering Not Guaranteed:SQS standard queues provide at-least-once delivery but do not guarantee order, making them unsuitable for sequential processing.D. Create an Amazon SNS topic to deliver notifications containing payloads to process. Configure an Amazon SQS queue as a subscriber.SNS + SQS Does Not Ensure Order by Default:While SNS can fan out to an SQS queue, multiple consumers (e.g., Lambda or EC2) may process messages out of order unless using FIFO queues (which would require an SNS FIFO topic, not standard SNS).Key Comparison:RequirementSQS FIFO + Lambda (A)Other OptionsMaintains message order(FIFO guarantee) (B: SNS parallel; C: Standard SQS; D: SNS+SQS no order) Low operational overhead(Serverless, auto-scaling) (B/D: SNS adds complexity; C: No ordering) Built-in retry logic(Lambda retries failed messages) (B/D: Requires manual retry handling; C: No retries for order)Conclusion:Option A is the only solution that:Guarantees message ordering (FIFO queue).Minimizes operational overhead (serverless Lambda processing).Handles failures gracefully (retries and DLQ support).Final Answer: A