AWS Certified Developer – Associate — Question 60
A global company has a mobile app with static data stored in an Amazon S3 bucket in the us-east-1 Region. The company serves the content through an Amazon
CloudFront distribution. The company is launching the mobile app in South Africa. The data must reside in the af-south-1 Region. The company does not want to deploy a specific mobile client for South Africa.
What should the company do to meet these requirements?
Answer options
- A. Use the CloudFront geographic restriction feature to block access to users in South Africa.
- B. Create a Lambda@Edge function. Associate the Lambda@Edge function as an origin request trigger with the CloudFront distribution to change the S3 origin Region.
- C. Create a Lambda@Edge function. Associate the Lambda@Edge function as a viewer response trigger with the CloudFront distribution to change the S3 origin Region.
- D. Include af-south-1 in the alternate domain name (CNAME) of the CloudFront distribution.
Correct answer: B
Explanation
The correct answer is B because creating a Lambda@Edge function as an origin request trigger allows the application to modify the request before it reaches the origin, enabling the use of the S3 bucket in the af-south-1 Region. Option A is incorrect as it restricts access rather than providing the necessary data to users in South Africa. Options C and D are incorrect since they do not effectively change the S3 origin Region for the specific needs of the new mobile app launch.