A media company is redesigning its analytics application to optimize costs and improve scalability. The application receives clickstream data from client devices at highly unpredictable intervals throughout the day, which must be stored in a NoSQL database. Every night, a batch job runs to aggregate and analyze the daily clickstream data, taking between 3 to 4 hours to complete. Additionally, the application runs in private subnets and must frequently transfer hundreds of gigabytes of raw logs to and from an Amazon S3 bucket. Which combination of architectural decisions represents the most cost-effective and scalable solution?
- Set the Amazon DynamoDB table capacity mode to on-demand, execute the nightly batch job using Amazon ECS tasks running on AWS Fargate Spot, and configure an Amazon S3 Gateway VPC Endpoint in the private subnets.Answer
- BSet the Amazon DynamoDB table capacity mode to on-demand, execute the nightly batch job using AWS Lambda functions chained via Amazon SQS, and route the Amazon S3 data transfer through a NAT Gateway.
- CSet the Amazon DynamoDB table capacity mode to on-demand, execute the nightly batch job using Amazon ECS tasks running on AWS Fargate Spot, and route the Amazon S3 data transfer through a NAT Gateway.
- DSet the Amazon DynamoDB table capacity mode to provisioned capacity mode with a fixed read/write capacity, execute the nightly batch job using Amazon ECS tasks running on AWS Fargate Spot, and configure an Amazon S3 Gateway VPC Endpoint in the private subnets.
Answer
The most cost-effective and scalable solution is to set the Amazon DynamoDB table capacity mode to on-demand, run the nightly batch job using Amazon ECS tasks on AWS Fargate Spot, and configure an Amazon S3 Gateway VPC Endpoint in the private subnets.
The correct option combines Amazon DynamoDB on-demand mode (to dynamically handle spiky clickstream ingestion), AWS Fargate Spot (to cost-effectively host containerized tasks that run for several hours without paying full Fargate prices), and an Amazon S3 Gateway VPC Endpoint (to eliminate NAT Gateway processing fees for the frequent, large S3 transfers).
Step-by-Step Solution
Key Concept
Selecting cost-optimized scaling and serverless models based on execution duration, traffic predictability, and network routing costs.