A company is developing an event-driven system that writes audit logs from several AWS Lambda functions into a database. The log volume is extremely unpredictable; the database experiences hours of inactivity, but can suddenly receive spikes of up to write operations per second when upstream batch jobs trigger. The database must handle these sudden bursts immediately without throttling, and the solution must minimize operational costs. Which database capacity configuration is the most cost-effective for this workload?
- Configure an Amazon DynamoDB table using on-demand capacity mode.Answer
- BConfigure an Amazon DynamoDB table using provisioned capacity mode with Auto Scaling enabled.
- CConfigure an Amazon DynamoDB table using provisioned capacity mode statically provisioned for the maximum peak throughput of write capacity units (WCUs).
- DMigrate the application database to Amazon RDS with Multi-AZ enabled and use read replicas to handle the write bursts.
Answer
Configure an Amazon DynamoDB table using on-demand capacity mode.
Configuring the Amazon DynamoDB table with on-demand capacity mode is the most cost-effective choice. It automatically manages and scales the throughput capacity to meet the sudden spikes of write operations per second without any capacity planning or latency lag, preventing throttling. Since it charges only for the actual read/write requests consumed, no costs are incurred during the hours of inactivity.
Step-by-Step Solution
Key Concept
Selecting the cost-optimal capacity mode in Amazon DynamoDB based on workload predictability and burst characteristics.