exam questions

Exam AWS Certified Developer Associate All Questions

View all questions & answers for the AWS Certified Developer Associate exam

Exam AWS Certified Developer Associate topic 1 question 76 discussion

Exam question from Amazon's AWS Certified Developer Associate
Question #: 76
Topic #: 1
[All AWS Certified Developer Associate Questions]

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?

  • A. 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.
  • B. Create a CloudFront function to inspect the CloudFront-Viewer-Country header and return redirect responses to different URLs based on user location.
  • C. 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.
  • D. 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.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
JOL86
Highly Voted 2 years, 7 months ago
This should be B I think: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/example-function-redirect-url.html Route 53/DNS can't redirect urls, only domains from what I can see
upvoted 9 times
...
sumanshu
Most Recent 4 months, 1 week ago
Selected Answer: B
B) - Correct - mazon CloudFront provides the CloudFront-Viewer-Country header. You can create a lightweight CloudFront function to inspect this header and generate a redirect response to the appropriate country-specific URL.
upvoted 1 times
...
JonasKahnwald
5 months, 2 weeks ago
Selected Answer: B
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/example_cloudfront_functions_redirect_based_on_country_section.html
upvoted 1 times
...
Teemo2023
1 year, 4 months ago
Selected Answer: B
ninomfr64 is right
upvoted 1 times
...
sweetheatmn
1 year, 6 months ago
Selected Answer: B
I go with B
upvoted 1 times
...
AWSdeveloper08
1 year, 9 months ago
Selected Answer: B
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/example-function-redirect-url.html
upvoted 1 times
...
tuongthuy
1 year, 9 months ago
Selected Answer: B
Correct answer is B
upvoted 1 times
...
rcaliandro
1 year, 10 months ago
Selected Answer: A
The correct answer is A. With Route 53 we can take advantage to geolocation to configure the routing based on the request Country and set the URLs for the specified Countries.
upvoted 1 times
ninomfr64
1 year, 8 months ago
This would work if we redirect to us.example.com, but here we are redirecting to example.com/us and Route53 works with hostnames not paths. To me R53 would be a solution if the scenario had multiple ECS cluster in different regions
upvoted 7 times
ninomfr64
1 year, 8 months ago
Here is the AWS doc with CloudFront Function to implement this specific use case https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/example-function-redirect-url.html
upvoted 3 times
...
...
...
ezredame
1 year, 11 months ago
Selected Answer: B
you must configure CloudFront to add the CloudFront-Viewer-Country header to incoming requests by adding it to the allowed headers in a cache policy or an origin request policy
upvoted 1 times
...
MrTee
2 years ago
Selected Answer: B
B. Create a CloudFront function to inspect the CloudFront-Viewer-Country header and return redirect responses to different URLs based on user location. This allows the developer to use a CloudFront function to inspect the request headers and redirect users to the appropriate country-specific website based on their location.
upvoted 1 times
...
javarun
2 years ago
Selected Answer: B
B sounds correct
upvoted 1 times
...
xifengying
2 years ago
Selected Answer: B
route 53 geolocation routing policy can route traffic to another AWS resource / another DNS record, it can't route to URLs
upvoted 4 times
...
ts1989
2 years, 2 months ago
Selected Answer: B
I don't think route table can add /us URL
upvoted 2 times
...
eversonzs
2 years, 2 months ago
Selected Answer: A
A route 53 make more sense since require least operational effort https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy-geo.html
upvoted 1 times
rlnd2000
2 years, 1 month ago
No way you can add any url to Geolocation policy, Geolocation Policy works with IP address of the server hosting the url so this two URL have the same IP example.com/us/ example.com/fr/ route53 is not the option.
upvoted 1 times
borisgor
2 years ago
Right, child urls (xxxxx.com/us or /fr) cant have different dns records , it's B
upvoted 1 times
...
...
...
ezeik
2 years, 2 months ago
Selected Answer: A
I think the A is correct, https://stackoverflow.com/questions/46212241/domain-redirection-based-on-geo-aws
upvoted 2 times
...
MMaquis
2 years, 2 months ago
Selected Answer: A
The solution requires LEAST operational effort, which is definitely not a CloudForm function configuring. It's much easier to use route 53 geo.
upvoted 1 times
...
Smartiup
2 years, 2 months ago
Selected Answer: A
Make it with route 53 since its possible to check the country of the request and map from cname to cname. Also it requires the least effort since you dont have to make a function for it to work.
upvoted 1 times
Smartiup
2 years, 2 months ago
Its B... after further investigation its not possible with route 53 alone to redirect to a path like www.example.com/fr or /us. The most correct way to resolve this would be to use route53 AND cloudfront, since you can only pick 1 service cloudfront will have to do it alone in a hacky way by using the function to determine origin country.
upvoted 2 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago