AWS Certified Solutions Architect – Professional — Question 307
A company's service for video game recommendations has just gone viral. The company has new users from all over the world. The website for the service is hosted on a set of Amazon EC2 instances in an Auto Scaling group behind an Application Load Balancer (ALB). The website consists of static content with different resources being loaded depending on the device type.
Users recently reported that the load time for the website has increased. Administrators are reporting high loads on the EC2 instances that host the service.
Which set actions should a solutions architect take to improve response times?
Answer options
- A. Create separate Auto Scaling groups based on device types. Switch to Network Load Balancer (NLB). Use the User-Agent HTTP header in the NLB to route to a different set of EC2 instances.
- B. Move content to Amazon S3. Create an Amazon CloudFront distribution to serve content out of the S3 bucket. Use Lambda@Edge to load different resources based on the User-Agent HTTP header.
- C. Create a separate ALB for each device type. Create one Auto Scaling group behind each ALB. Use Amazon Route 53 to route to different ALBs depending on the User-Agent HTTP header.
- D. Move content to Amazon S3. Create an Amazon CloudFront distribution to serve content out of the S3 bucket. Use the User-Agent HTTP header to load different content.
Correct answer: B
Explanation
Migrating static content to Amazon S3 and caching it globally via Amazon CloudFront offloads traffic from the EC2 instances, resolving the high load and latency issues. Lambda@Edge is necessary to inspect the User-Agent HTTP header at edge locations and dynamically rewrite requests to serve device-specific resources. Other options are incorrect because Network Load Balancers and Route 53 cannot route traffic based on HTTP headers, and CloudFront alone cannot perform the required request manipulation without edge compute.