A company stores media in an S3 bucket and uses CloudFront to distribute it. Licensing restrictions prevent distribution in certain countries. Which approach is the MOST operationally efficient way to block users in the restricted countries from accessing the content?
Choose an answer
Tap an option to check your answer.
Correct answer: Use CloudFront’s geo restriction (geoblocking) feature on the distribution to block the disallowed countries..
Why this is the answer
The most operationally efficient way to block users in restricted countries is to use CloudFront's geo restriction (geoblocking) feature. This built-in CloudFront functionality allows you to specify countries from which you want to prevent access to your content. CloudFront handles the IP address lookup and blocking automatically at the edge, before requests reach your origin, making it highly efficient and easy to manage. Adding a bucket policy based on s3:LocationConstraint is incorrect because s3:LocationConstraint refers to the AWS region where the bucket is located, not the geographic location of the requesting user. Creating another OAI and modifying the bucket policy to block requests from prohibited countries is also incorrect; OAIs are used to restrict direct S3 access, and S3 bucket policies are not designed for efficient geo-blocking based on user location. Changing the application to produce signed CloudFront URLs based on IP address is less operationally efficient as it requires application code changes and adds complexity to URL generation and validation, rather than leveraging a native CloudFront feature.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed