Using CloudFront Geo Restriction
When a user requests your content, CloudFront typically serves the requested content regardless of where the user is located. If you need to prevent users in specific countries from accessing your content, you can use the CloudFront geo restriction feature to do one of the following:
- Allow your users to access your content only if they're in one of the countries on a whitelist of approved countries.
- Prevent your users from accessing your content if they're in one of the countries on a blacklist of banned countries.
To add geo restriction to your CloudFront web distribution (console)
- Sign in to the AWS Management Console and open the CloudFront console at https://console.aws.amazon.com/cloudfront/
- Select the distribution that you want to update.
- In the Distribution Settings pane, choose the Restrictions tab.
- Choose Edit.
- Enter the applicable values. For more information, see Restrictions.
- Choose Yes, Edit.