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

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.