AWS Certified Developer – Associate — Question 395

An ecommerce company wants to redirect users to a country-specific website when they enter the example.com website. For example, the company wants to redirect United States users to example.com/us/ and wants to redirect French users to example.com/fr/. The web application is using Amazon CloudFront and an
Application Load Balancer with an Amazon Elastic Container Service (Amazon ECS) cluster. The application's domain name resolution is configured in an
Amazon Route 53 public hosted zone.
Which solution will meet these requirements with the LEAST operational effort?

Answer options

Correct answer: B

Explanation

Using a CloudFront function is the most efficient solution because it executes at the edge locations with ultra-low latency, inspecting the automatically populated 'CloudFront-Viewer-Country' header and returning a redirect response before the request ever reaches the origin. Other options, such as maintaining a GeoIP database on ECS (Option C) or configuring complex routing/WAF rules (Options A and D), require significantly more operational effort, maintenance, and resource consumption.