A company is designing a serverless backend for a new web application. The application will experience sudden, highly irregular spikes in database reads and writes, with long periods of zero traffic. The architect wants to minimize costs by ensuring that both compute and database resources scale automatically to zero when there is no traffic.
Which combination of AWS services and configurations will achieve this goal most cost-effectively?
- AWS Lambda for compute and Amazon DynamoDB configured with on-demand capacity mode.Answer
- BAWS Lambda for compute and Amazon DynamoDB configured with provisioned capacity mode.
- CAn AWS Lambda function configured to run continuously in a loop for compute and Amazon DynamoDB in on-demand capacity mode.
- DAWS Lambda for compute and Amazon S3 Standard-Infrequent Access (S3 Standard-IA) to temporarily store transactional tables that are deleted daily.
Answer
AWS Lambda for compute and Amazon DynamoDB configured with on-demand capacity mode.
AWS Lambda and Amazon DynamoDB on-demand capacity mode are fully serverless offerings. Lambda charges only for the exact milliseconds of execution duration, and DynamoDB on-demand charges per request. When there is no incoming traffic, both services scale to zero active capacity and do not incur any compute or request charges, making them the most cost-effective solution for irregular spikes.
Step-by-Step Solution
Key Concept
Serverless architectures achieve cost efficiency by scaling both compute and database resources to zero when there is no traffic.