AWS CloudFront Hands On¶
We'll create an AWS S3 Bucket¶
Everything currently will be with default settings.
Found a free [[HTML]] template to upload for testing.
We'll create a Programming/AWS/CloudFront/AWS CloudFront distribution and an [[Origin Access identity]], limit the [[S3 bucket]] to be accessed only using this identity.¶
Now we are going to Programming/AWS/CloudFront/AWS CloudFront service in AWS Console and create a distribution.
In the Origin Domain Name
we select our AWS S3 Bucket.
Check Restrict bucket Access
, create a new identity access-identity-demo
, check Grant Read Permissions on Bucket
.
Viewer Protocol Policy
- Redirect HTTP to HTTPS
.
Now the distribution is being created, it can take several minutes to complete.
We should also see an Origin Access Identity
created.
Also, we can see that the public access has been enabled for the S3 bucket.
Now, when visiting the generated CloudFront URL, we might see a redirect to the bucket itself and throwing an error.
This is due to the fact that everything is set up but the [[AWS internal DNS]] has not been updated yet, it might take a couple of hours to update and then it should work.