Q90 — AWS SAA-C03 Ch.14

Question 90 of 100 | ← Chapter 14

Q1090. A company is building a serverless application to process orders from an ecommerce site. The application needs to handle bursts of traffic during peak usage hours and to maintain high availability. The orders must be processed asynchronously in the order the applicationreceives them.Which solution will meet these requirements?

Correct Answer: B. Use an Amazon Simple Queue Service (Amazon SQS) FIFO queue to receive orders. Use an AWS Lambda function to process the orders.

Explanation

To determine the best solution for a serverless application that processes orders asynchronously in the order they are received, handles bursts of traffic, and maintains high availability, let's evaluate each option:A. Use an Amazon Simple Notification Service (Amazon SNS) topic to receive orders. Use an AWS Lambda function to process the orders.Amazon SNS is designed for high-throughput, low-latency messaging. However, SNS topics do not inherently maintain the order of messages. SNS is best suited for fan-out architectures where the same message needs to be delivered to multiple endpoints.AWS Lambda can process messages asynchronously, but without ordering guarantees from SNS, this option does not meet the requirement to process orders in the order they are received. B. Use an Amazon Simple Queue Service (Amazon SQS) FIFO queue to receive orders. Use an AWS Lambda function to process the orders.Amazon SQS FIFO (First-In-First-Out) queues provide strict ordering of messages. This ensures that orders are processed in the order they are received.AWS Lambda can be triggered by SQS FIFO queues, allowing asynchronous processing of messages. SQS can handle variable traffic loads, making it suitable for handling bursts of traffic during peak usage hours.Together, these services meet the requirements of handling bursts of traffic, maintaining high availability, and processing orders asynchronously in the order they are received. C. Use an Amazon Simple Queue Service (Amazon SQS) standard queue to receive orders. Use AWS Batch jobs to process the orders.Amazon SQS standard queues do not guarantee the order of message delivery. AWS Batch is designed for running batch computing workloads, which may not be the most efficient or cost-effective way to process individual orders asynchronously in real-time. This option does not meet the requirement to process orders in the order they are received and might not be optimal for handling real-time, asynchronous order processing. D. Use an Amazon Simple Notification Service (Amazon SNS) topic to receive orders. Use AWS Batch jobs to process the orders.SNS, as discussed, does not provide ordering guarantees.AWS Batch, as mentioned, is not suited for real-time, asynchronous processing of individual orders. This option does not meet the requirement to process orders in the order they are received and is not suitable for real-time order processing.Given the requirements, the best solution is:B. Use an Amazon Simple Queue Service (Amazon SQS) FIFO queue to receive orders. Use an AWS Lambda function to process the orders.This solution ensures that orders are processed asynchronously in the order they are received, can handle bursts of traffic, and maintains high availability.