AWS Certified Solutions Architect – Professional — Question 652
A media company is hosting a high-traffic news website on AWS. The website's front end is based solely on HTML and JavaScript. The company loads all dynamic content by using dynamic asynchronous JavaScript requests to a dedicated backend infrastructure.
The front end runs on four Amazon EC2 instances as web servers. The dynamic backend runs in containers on an Amazon Elastic Container Service (Amazon
ECS) cluster that uses an Auto Scaling group of EC2 instances. The ECS tasks are behind an Application Load Balancer (ALB).
Which solutions should a solutions architect recommend to optimize costs? (Choose two.)
Answer options
- A. Migrate the front end of the website to an Amazon S3 bucket Deploy an Amazon CloudFront distribution. Set the S3 bucket as the distribution's origin.
- B. Deploy an Amazon CloudFront distribution. Configure the distribution to use the ALB endpoint as the origin.
- C. Migrate the front-end services to the ECS cluster. Increase the minimum number of nodes in the Auto Scaling group.
- D. Turn on Auto Scaling for the front-end EC2 instances. Configure a new listener rule on the ALB to serve the front end.
- E. Migrate the backend of the website to an Amazon S3 bucket. Deploy an Amazon CloudFront distribution. Set the S3 bucket as the distribution's origin.
Correct answer: A, B
Explanation
Hosting a static HTML/JavaScript front end on Amazon S3 and delivering it via Amazon CloudFront is a highly cost-effective, serverless approach that completely removes the need to pay for dedicated EC2 web servers. Furthermore, deploying CloudFront in front of the Application Load Balancer helps cache dynamic API responses at the edge, reducing the traffic reaching the ECS backend and allowing the ECS cluster to scale down, saving additional costs. Other options either continue to use expensive compute resources for static hosting or incorrectly attempt to host dynamic backend services on Amazon S3, which only supports static assets.