Question

Difficulty: MediumServerless and Automated Scaling Architectures for Cost Efficiency

A retail company is launching a promotional website for a new product line. The website serves static content and retrieves product catalog information via an API. The website traffic is highly unpredictable, with extreme spikes during marketing campaigns and long periods of inactivity. Additionally, a nightly inventory synchronization process runs continuously for 33 hours to update the catalog database. The company wants to design a serverless architecture that minimizes costs, especially during idle periods, while scaling automatically.

Which architecture should a solutions architect recommend to meet these requirements?

  1. Host static content on Amazon S3 with an Amazon CloudFront distribution, use Amazon API Gateway with AWS Lambda for the API, run the nightly inventory sync as an Amazon ECS task on AWS Fargate, and store product catalog data in Amazon DynamoDB configured in on-demand capacity mode.Answer
  2. B
    Host static content on Amazon S3 with an Amazon CloudFront distribution, use Amazon API Gateway with a scheduled AWS Lambda function running a continuous loop for 33 hours to process the nightly inventory sync, and store product catalog data in Amazon DynamoDB configured in on-demand capacity mode.
  3. C
    Host static content on Amazon S3 with an Amazon CloudFront distribution, use Amazon API Gateway with AWS Lambda for the API, run the nightly inventory sync as an Amazon ECS task on AWS Fargate, and store product catalog data in Amazon DynamoDB configured in provisioned capacity mode.
  4. D
    Host static content on Amazon S3 with an Amazon CloudFront distribution configured with a Time to Live (TTL) of 00 for all cache behaviors, use Amazon API Gateway with AWS Lambda for the API, run the nightly inventory sync as an Amazon ECS task on AWS Fargate, and store product catalog data in Amazon DynamoDB configured in on-demand capacity mode.

Answer

Host static content on Amazon S3 with an Amazon CloudFront distribution, use Amazon API Gateway with AWS Lambda for the API, run the nightly inventory sync as an Amazon ECS task on AWS Fargate, and store product catalog data in Amazon DynamoDB configured in on-demand capacity mode.
The correct solution recommends Amazon S3 and Amazon CloudFront for static hosting, AWS Lambda and Amazon API Gateway for lightweight API requests, Amazon ECS on AWS Fargate for the 33-hour inventory sync, and Amazon DynamoDB in on-demand capacity mode. This aligns the billing model of each service with the workload profile: compute costs scale to zero during idle periods, the long-running inventory task runs safely without timeout limits, and database costs reflect actual request volume rather than provisioned capacity.

Step-by-Step Solution

1
Analyze the web hosting and API requirements.
Amazon S3 combined with Amazon CloudFront provides highly scalable, low-latency static hosting. Amazon API Gateway with AWS Lambda provides a serverless API that scales instantly and costs nothing during periods of inactivity.
To ensure maximum cost-efficiency during idle periods and automatic scaling during marketing spikes.
2
Evaluate the database scaling and capacity requirements.
Select Amazon DynamoDB on-demand capacity mode.
Since traffic is highly unpredictable with long idle periods, on-demand capacity mode prevents paying for unused provisioned capacity, ensuring cost-efficiency.
3
Evaluate the backend processing requirements for the nightly inventory synchronization.
Select Amazon ECS on AWS Fargate.
The task runs continuously for 33 hours, which exceeds the AWS Lambda maximum execution limit of 1515 minutes. Amazon ECS on Fargate runs containers serverlessly and only incurs charges for the exact duration of the container execution, making it the most cost-effective choice for long-running batch processes.

Key Concept

Selecting cost-optimized compute, integration, and database services by aligning performance profiles with automated scaling and serverless architectures.
Estimated Time:1m 30s
Rate this question