AWS Certified Developer Associate DVA-C01 – Question286

An application uses an Amazon CloudFront distribution to deliver static content from Amazon S3 buckets that are set up in multiple AWS Regions around the world. A developer receives reports of problems with latency when cached content is updated.
The developer plans to address this problem by redirecting requests on cache misses to the S3 bucket in the Region that is nearest to the user's country. The developer configures the distribution to cache based on the CloudFront-Viewer-Country request header.
What should the developer do next to redirect requests on cache misses?

A.
Create a CloudFront function to redirect requests based on the value of the CloudFront-Viewer-Country header. Associate the CloudFront function with the distribution's origin request event.
B. Create a Lambda@Edge function to redirect requests based on the value of the CloudFront-Viewer-Country header. Associate the Lambda@Edge function with the distribution's origin request event.
C. Create a Lambda@Edge function to redirect requests based on the value of the CloudFront-Viewer-Country header. Associate the Lambda@Edge function with the distribution's viewer request event.
D. Create a CloudFront function to redirect requests based on the value of the CloudFront-Viewer-Country header. Associate the CloudFront function with the distribution's viewer request event.

Correct Answer: D