
Answer-first summary for fast verification
Answer: Create an Amazon CloudFront distribution to host the static web contents from an Amazon S3 bucket.
## Explanation **Correct Answer: C** - Create an Amazon CloudFront distribution to host the static web contents from an Amazon S3 bucket. **Why this is the MOST cost-effective solution:** 1. **Problem Analysis**: The issue is that high volumes of static web content access are triggering Auto Scaling to launch additional EC2 instances (On-Demand). This is inefficient because: - Static content doesn't require compute processing - EC2 instances are expensive for serving static files - Auto Scaling adds unnecessary compute costs 2. **Solution Benefits**: - **Amazon S3**: Extremely cost-effective storage for static content ($0.023 per GB/month) - **Amazon CloudFront**: Global CDN with pay-per-use pricing, reduces origin load - **Reduced EC2 Costs**: Offloads static content from EC2 instances, reducing compute requirements - **Better Performance**: CloudFront delivers content from edge locations closer to users 3. **Why other options are less optimal:** - **Option A (Reserved Instances)**: Still uses EC2 for static content, doesn't address the root cause - **Option B (Spot Instances)**: Cheaper compute but still inappropriate for static content delivery - **Option D (Lambda + API Gateway)**: Serverless but more expensive than S3+CloudFront for static content 4. **Cost Comparison**: - **S3 + CloudFront**: ~$0.09 per GB for first 10TB (including storage and transfer) - **EC2**: ~$0.10-0.50 per hour + data transfer costs - **Lambda**: $0.20 per 1M requests + compute time + API Gateway costs **Implementation Steps:** 1. Move static content (images, CSS, JS, HTML) to S3 bucket 2. Configure CloudFront distribution with S3 as origin 3. Update application to reference CloudFront URLs for static assets 4. Configure Auto Scaling policies to scale based on dynamic content load only This solution directly addresses the cost inefficiency of using EC2 instances for static content delivery while maintaining performance and scalability.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A company hosts a multi-tier web application on Amazon Linux Amazon EC2 instances behind an Application Load Balancer. The instances run in an Auto Scaling group across multiple Availability Zones. The company observes that the Auto Scaling group launches more On-Demand Instances when the application's end users access high volumes of static web content. The company wants to optimize cost.
What should a solutions architect do to redesign the application MOST cost-effectively?
A
Update the Auto Scaling group to use Reserved Instances instead of On-Demand Instances.
B
Update the Auto Scaling group to scale by launching Spot Instances instead of On-Demand Instances.
C
Create an Amazon CloudFront distribution to host the static web contents from an Amazon S3 bucket.
D
Create an AWS Lambda function behind an Amazon API Gateway API to host the static website contents.