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?
- 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.Cevap
- BRoute 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.
- CRoute the updates to an Amazon SQS FIFO queue, configure an AWS Lambda function with a continuous execution loop to poll the queue , and write the data to an Amazon DynamoDB table in On-Demand capacity mode.
- DRoute 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.
Cevap
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.
Adım Adım Çözüm
Anahtar Kavram
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.