CloudFront has added a geo-restriction feature to make it easier to restrict access to your content based on the geographic location of your viewers.
Geographic restrictions with Amazon CloudFront
How to do it...
- Log in to the AWS Console, select CloudFront Distributions, then select your distribution, and go to the Restrictions tab.
![](https://static.packt-cdn.com/products/9781787123243/graphics/assets/6fe345f3-4d3b-4bc1-a40a-5b5443ee5c3c.png)
CloudFront Console
- Click on Edit.
![](https://static.packt-cdn.com/products/9781787123243/graphics/assets/87235e63-c224-4ca9-bc1b-a3da2ec35b12.png)
CloudFront Restrictions Setup
Once you enable the feature, you can select whether you want to configure a whitelist or blacklist of countries for your distribution.
- Select one or more countries from the list in the left-side box, and move those countries to the right-side box and then click on Yes, Edit button.
![](https://static.packt-cdn.com/products/9781787123243/graphics/assets/997dabcb-db01-4d0e-9bb7-fea98cb43682.png)
Enable CloudFront Restrictions
- That&apos...