What should a solutions architect do to redesign the application MOST cost-effectively?
Update the Auto Scaling group to use Reserved Instances instead of On-Demand Instances.
Update the Auto Scaling group to scale by launching Spot Instances instead of On-Demand Instances.
Create an Amazon CloudFront distribution to host the static web contents from an Amazon S3 bucket.
Create an AWS Lambda function behind an Amazon API Gateway API to host the static website contents.
Explanations:
Using Reserved Instances would provide cost savings for predictable workloads but does not address the high volume of static content served, which is better optimized by using caching solutions like CloudFront. Reserved Instances also require a commitment to usage levels that may not be suitable for fluctuating traffic patterns.
Switching to Spot Instances could reduce costs, but Spot Instances are not suitable for serving high-availability applications due to their potential interruption. Since the application serves static content, the design may not benefit significantly from Spot Instances, which could lead to availability issues during high traffic periods.
Creating an Amazon CloudFront distribution to serve static web content from an Amazon S3 bucket is the most cost-effective option. CloudFront is a content delivery network (CDN) that caches static content at edge locations, reducing the load on EC2 instances and lowering costs by minimizing data transfer and request handling by the backend infrastructure.
Using AWS Lambda with API Gateway for hosting static content is not optimal for cost and performance. AWS Lambda is designed for dynamic, serverless compute tasks and is more expensive for serving static content compared to CloudFront, which is specifically designed for this purpose. Additionally, API Gateway incurs extra costs for each request, which is unnecessary for static file hosting.