
Day 11: Amazon Route 53 and CloudFront – DNS and Content Delivery
Day 11 of my 90-day AWS challenge: how Route 53 turns domain names into IP addresses, how CloudFront delivers content faster from edge locations, and how the two work together with S3 for a fast, secure website.
Recap of Day 10
Yesterday I learned how load balancers and Auto Scaling keep an application available. Now the question is how users actually find it and how to make it fast for people far away. That is where Route 53 and CloudFront come in.
Amazon Route 53
Route 53 is AWS's highly available DNS (Domain Name System) service. DNS translates a name like
example.com into an IP address that computers use. Route 53 can also register domains and check the health of your resources.Common record types
| Record | What it does |
|---|---|
| A | Points a name to an IPv4 address |
| AAAA | Points a name to an IPv6 address |
| CNAME | Points a name to another name |
| Alias | An AWS-specific record that points a name to AWS resources such as CloudFront, an ALB, or S3 |
| MX | Directs email to mail servers |
| TXT | Stores text, often used for verification |
Routing policies
- Simple: one record, one answer
- Weighted: split traffic by percentage, e.g. 90/10 for testing a new version
- Latency-based: send users to the Region with the lowest latency
- Failover: switch to a backup when the primary fails a health check
- Geolocation: route based on where the user is
Amazon CloudFront
CloudFront is a CDN (Content Delivery Network). It caches copies of your content at edge locations around the world, so users get it from a nearby location instead of from the origin server every time. This ties back to Day 1, when I learned about edge locations as part of the AWS Global Infrastructure.
Key concepts
| Concept | What it is |
|---|---|
| Distribution | The CloudFront configuration that delivers your content |
| Origin | Where the original content lives, e.g. an S3 bucket or an ALB |
| Edge location | A nearby cache that serves users |
| TTL | How long content stays cached before CloudFront checks the origin again |
| Invalidation | A request to remove cached content before the TTL ends |
| Origin Access Control (OAC) | Lets CloudFront read a private S3 bucket so users cannot bypass it |
How they work together
- A user types my domain name
- Route 53 resolves it, using an Alias record, to a CloudFront distribution
- CloudFront serves the content from the nearest edge location, or fetches it from the S3 origin if it is not cached
- The S3 bucket stays private, and only CloudFront can read it
- HTTPS is provided with a certificate from AWS Certificate Manager (ACM)
What I practiced today
- Explored hosted zones and record types in the Route 53 console
- Created a CloudFront distribution with an S3 bucket as the origin
- Used Origin Access Control so the bucket stays private
- Opened the distribution's domain name and checked that my page loaded
- Cleaned up the resources afterwards
Key takeaways
- Route 53 answers where a name points, and CloudFront decides how fast content arrives
- Keep S3 buckets private and serve them through CloudFront
- A Route 53 hosted zone and a registered domain both have costs, so check pricing first
Up next: Day 12
Amazon DynamoDB: NoSQL databases on AWS.
Learning AWS too? Follow along and share what you're building. #90DaysOfAWS
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article