Which solution will meet these requirements with the LEAST operational effort?
Update the routing policy for the application’s Route 53 record to specify geolocation routing. Configure listener rules based on a unique alias location to redirect requests to the correct URLs by country.
Create a CloudFront function to inspect the CloudFront-Viewer-Country header and return redirect responses to different URLs based on user location.
On the ECS web server configuration, use a GeoIP database to look up the requested IP address and redirect requests to the correct URLs by country.
Use AWS WAF to determine the country of origin. Create an AWS WAF custom rule with a geographic match condition to redirect traffic from each country to the correct URL.
Explanations:
Route 53 geolocation routing is effective for DNS level redirection but does not handle HTTP redirects to specific URLs; CloudFront or application-level redirection is required for URL paths.
CloudFront functions can inspect theCloudFront-Viewer-Countryheader and return location-based redirects efficiently at the edge, minimizing operational effort and latency.
Configuring GeoIP-based redirects directly on ECS increases operational complexity, as ECS needs constant updates for IP data and would be less efficient than an edge-based solution like CloudFront.
AWS WAF geographic match can restrict access by region but cannot perform URL redirects; it’s not designed for dynamic redirection based on country.