Question

Difficulty: MediumServerless and Automated Scaling Architectures for Cost Efficiency

A logistics company is designing a serverless and automated scaling architecture to process order fulfillment status updates. The updates must be processed in the exact sequence they are received to ensure data integrity in the inventory database. The application receives updates continuously 24/7 at a stable rate, with each message taking an average of 45 seconds to process. The processed updates must then be stored in a database that experiences highly unpredictable, brief spikes in write requests.

Which two solutions should a solutions architect recommend to meet these requirements most cost-effectively? (Select TWO.)

  1. Configure the destination Amazon DynamoDB table in On-Demand capacity mode.Answer
  2. Buffer the incoming messages using Amazon SQS FIFO queues.Answer
  3. C
    Buffer the incoming messages using Amazon SQS standard queues.
  4. D
    Configure the destination Amazon DynamoDB table in provisioned capacity mode with high write capacity limits to handle peak traffic.
  5. E
    Deploy AWS Lambda functions triggered by the queue to process the continuous updates.

Answer

To meet these requirements cost-effectively, buffer the incoming messages using Amazon SQS FIFO queues to preserve order, and configure the destination Amazon DynamoDB table in On-Demand capacity mode to dynamically handle the unpredictable database traffic spikes without paying for idle capacity.
The system requires strict order processing, which is satisfied by buffering messages with Amazon SQS FIFO queues. Additionally, the database must handle highly unpredictable, brief spikes in write requests; configuring Amazon DynamoDB in On-Demand capacity mode accommodates these spikes instantly and cost-effectively by charging only for actual reads and writes, avoiding the cost of idle provisioned capacity.

Step-by-Step Solution

1
Analyze the ordering requirements for the message queue.
Since messages must be processed in the exact sequence they are received to ensure inventory data integrity, Amazon SQS FIFO queues must be selected instead of standard queues, which only guarantee best-effort ordering.
Standard SQS queues can deliver messages out of order, violating the core requirement of sequential processing.
2
Evaluate the database access patterns and scaling requirements.
The destination database experiences highly unpredictable, brief traffic spikes. Amazon DynamoDB in On-Demand capacity mode scales automatically and charges only for read/write requests made, whereas Provisioned Capacity mode requires over-provisioning to handle peak traffic, leading to idle capacity costs.
On-Demand capacity mode is the most cost-effective option for unpredictable, spiky workloads.
3
Assess the compute layer requirements for continuous workload processing.
The processing workload runs continuously 24/7 with long-running tasks. AWS Lambda is cost-inefficient for constant, long-running processes due to its execution duration pricing. A container-based approach (e.g., Amazon ECS on AWS Fargate) is the correct cost-optimized choice, making the deployment of Lambda functions incorrect.
Continuous execution on Lambda leads to high duration-based costs, making it suboptimal for stable 24/7 baselines.

Key Concept

Selecting cost-effective serverless queue and database capacity modes based on workload characteristics and sequencing requirements.
Rate this question