How can I restrict location access to web content that my CloudFront distribution serves?

2 minute read
0

I want to prevent users in certain countries from access to the web content that my Amazon CloudFront distribution serves.

Resolution

Turn on CloudFront geographic restriction

  1. Open the CloudFront console.
  2. Choose the distribution that you want to apply geo restriction to.
  3. Choose the Geographic Restrictions tab.
  4. Choose Edit.
  5. To allow access to countries, choose Allow List for Restriction type. To block access from certain countries, choose Block List.
  6. For Countries, choose the countries that you want to allow or block. Then, choose Add.
  7. Choose Save Changes.

For more information, see Using CloudFront geographic restrictions.

Use alternate ways to restrict content

You can also use the following ways to restrict access to web content that your CloudFront distribution serves:

Related information

How AWS WAF works

AWS OFFICIAL
AWS OFFICIALUpdated 7 months ago