Question

Difficulty: EasyServerless and Automated Scaling Architectures for Cost Efficiency

A company is migrating a legacy transactional system to AWS. The system receives events that must be processed in the exact order they are generated. The event volume is highly unpredictable, with hours of complete silence followed by sudden spikes of traffic. The processing of each event is lightweight and takes less than 5 seconds. Which two configuration options should a solutions architect combine to design a serverless, cost-effective architecture that scales automatically and preserves message order? (Select TWO.)

  1. Configure an Amazon SQS FIFO queue to store the incoming events and preserve their sequence.Answer
  2. Use an AWS Lambda function triggered by the queue to process the events, which automatically scales down to zero when no events are present.Answer
  3. C
    Configure an Amazon SQS standard queue to buffer the events, relying on standard queue sequencing to process them in order.
  4. D
    Deploy the processing logic on an AWS Lambda function configured with a keep-alive loop to poll the queue continuously 24/7.

Answer

The correct architecture uses an Amazon SQS FIFO queue to guarantee message order, combined with an AWS Lambda function that scales down to zero when idle.
The combination of an Amazon SQS FIFO queue and an AWS Lambda function provides a serverless architecture that scales on-demand. SQS FIFO ensures messages are processed in the correct order, and AWS Lambda processes the messages as they arrive, scaling down to zero when the queue is empty to avoid idle compute costs.

Step-by-Step Solution

1
Analyze ordering requirements.
The legacy system requires events to be processed in the exact sequence they are generated.
This necessitates the use of Amazon SQS FIFO queues instead of standard queues, which only offer best-effort ordering.
2
Evaluate scaling and idle costs.
The traffic profile is highly unpredictable with periods of complete silence.
An event-driven AWS Lambda configuration is ideal as it scales to zero instances during idle hours, minimizing compute costs compared to continuously running services.

Key Concept

Combining Amazon SQS FIFO queues for message sequencing with event-driven AWS Lambda triggers for automated scaling and cost-efficiency.
Rate this question