Amazon Web Services
AWS-13 intermediate
Serve a private S3 website worldwide with CloudFront, a custom domain and Route 53
Put CloudFront in front of a private S3 bucket with Origin Access Control, attach a custom domain with an ACM certificate and a Route 53 alias record, watch edge-cache hits and misses, and publish a new version with an invalidation.
What you'll do
- Create a public hosted zone
- Create a CloudFront distribution with an S3 origin and OAC
- Keep the bucket private with a CloudFront-only bucket policy
- Understand edge caching (Miss → Hit) and invalidations
- Map a custom domain with an ACM certificate and a Route 53 alias record
Lab tasks
-
1
Create the hosted zone
acme-shop.com - 2 Create a CloudFront distribution with OAC
- 3 See the bucket is still private
- 4 Allow only this distribution to read the bucket
- 5 Load the site through CloudFront (Miss)
- 6 Request it again (Hit)
- 7 Prove S3 cannot be reached directly
-
8
Point
www.acme-shop.comat the distribution - 9 Browse the custom domain
- 10 Publish version 2 with an invalidation