Configure CloudFront — EC2 or Load Balancer
We will create a CloudFront distribution using the AWS Console and link it to a WAF ACL.
Start by having an EC2 instance or ELB running for this project
Open the Amazon CloudFront console at https://console.aws.amazon.com/cloudfront/home?# and create a distribution.
In the Web section, click Get Started.
Specify settings for the distribution: Origin Domain Name - Enter DNS or domain name from your Elastic Load Balancer or EC2 instance
Click Create Distribution at the bottom of the page
CloudFront will create your distribution. This might take a while, it is finished when the status of the distribution changes from In Progress to Deployed.
Once your distribution is deployed, copy the domain name into a web browser to test that you can access your content using the CloudFront URL or CNAME.