Question

Difficulty: MediumServerless and Automated Scaling Architectures for Cost Efficiency

A smart home company is launching a system to process telemetry updates from connected thermostats. The updates include sequential temperature adjustments that must be processed in the exact order they are generated by each thermostat to ensure accurate reporting. The telemetry traffic is highly unpredictable, spiking during extreme weather events but remaining virtually idle during mild seasons. The company wants to minimize compute and database costs during idle periods. Which architecture is the most cost-effective and meets the requirements?

  1. Route the updates to an Amazon SQS FIFO queue, configure an AWS Lambda function using native event source mapping to process the updates from the queue, and write the data to an Amazon DynamoDB table in On-Demand capacity mode.Answer
  2. B
    Route the updates to an Amazon SQS FIFO queue, configure an AWS Lambda function using native event source mapping to process the updates from the queue, and write the data to an Amazon DynamoDB table in Provisioned capacity mode with Auto Scaling enabled.
  3. C
    Route the updates to an Amazon SQS FIFO queue, configure an AWS Lambda function with a continuous execution loop to poll the queue 24/724/7, and write the data to an Amazon DynamoDB table in On-Demand capacity mode.
  4. D
    Route the updates to a standard Amazon SQS queue, configure an AWS Lambda function using native event source mapping to process the updates from the queue, and write the data to an Amazon DynamoDB table in On-Demand capacity mode.

Answer

Route the updates to an Amazon SQS FIFO queue, configure an AWS Lambda function using native event source mapping to process the updates from the queue, and write the data to an Amazon DynamoDB table in On-Demand capacity mode.
The correct architecture uses Amazon SQS FIFO to guarantee that updates from each thermostat are processed in the exact sequence they are generated. AWS Lambda with native event source mapping ensures that compute resources are only consumed and billed when messages are in the queue, scaling to zero during idle periods. Amazon DynamoDB in On-Demand capacity mode handles unpredictable traffic spikes seamlessly and eliminates base capacity charges during inactive seasons, achieving optimal cost efficiency.

Step-by-Step Solution

1
Select the correct queue type to preserve telemetry sequence.
Amazon SQS FIFO queue is selected over standard SQS to ensure messages within the same thermostat message group are processed in first-in, first-out order.
Standard SQS does not guarantee ordering, which would violate the requirement to process sequential temperature adjustments in the order they are generated.
2
Select the appropriate compute scaling model to eliminate idle costs.
AWS Lambda triggered by native event source mapping is chosen.
Native event source mapping ensures Lambda is only invoked when messages arrive, scaling to zero during idle seasons and avoiding the costs of continuous polling or running idle instances.
3
Select the most cost-effective database capacity mode for spiky, idle workloads.
Amazon DynamoDB in On-Demand capacity mode is chosen.
On-Demand capacity mode accommodates sudden, unpredictable spikes instantly and charges nothing for storage read/write requests during periods of complete inactivity, unlike Provisioned capacity mode.

Key Concept

Serverless architectures optimize costs for unpredictable workloads by scaling compute (AWS Lambda) and database (Amazon DynamoDB On-Demand) to zero during idle periods, while Amazon SQS FIFO preserves ordering.
Rate this question