Route 53 and DNS for CloudOps
Operate DNS in AWS with public and private hosted zones, routing policies, health checks, resolver endpoints, query logging, and failover patterns.
What you'll learn
- Create hosted zones and DNS records
- Choose Route 53 routing policies for operations scenarios
- Configure health checks and DNS failover
- Understand Resolver endpoints for hybrid DNS
Prerequisites
Relevant for certifications
Route 53 Building Blocks
| Component | Purpose |
|---|---|
| Public hosted zone | Authoritative DNS for an internet domain |
| Private hosted zone | DNS names resolvable only inside associated VPCs |
| Record | Name such as app.example.com mapped to a target |
| Alias record | AWS-specific record that points to ALB, CloudFront, S3 website, API Gateway, and more |
| TTL | How long resolvers cache the answer |
Alias records
Use Alias A/AAAA records for AWS targets instead of CNAME at the zone apex. Alias records are free for AWS targets and work for root domains like example.com.
Routing Policies
| Policy | Operational use |
|---|---|
| Simple | One answer, basic DNS |
| Weighted | Gradual migration or A/B split |
| Latency | Route users to lowest-latency Region |
| Failover | Primary/secondary disaster recovery |
| Geolocation | Route by country or continent |
| Geoproximity | Route by distance with bias |
| Multi-value answer | Return several healthy IPs |
| IP-based | Route by client CIDR ranges |
Health Checks
Route 53 health checks can monitor public HTTP, HTTPS, or TCP endpoints, CloudWatch alarms, and calculated health checks. For private endpoints, use a CloudWatch alarm as the health check source.
Hands-on: Create a DNS Record for an ALB
Goal: Point app.example.com to an Application Load Balancer.
- Create or open a public hosted zone for your domain.
- Confirm your domain registrar uses the hosted zone name servers.
- Create an Application Load Balancer or use an existing one.
- In Route 53, choose Create record.
- Set record name
app, record typeA, and Alias enabled. - Route traffic to the ALB in its Region.
- Create the record.
- Test with:
nslookup app.example.com
curl -I http://app.example.com
Hands-on: Weighted Routing for a Blue/Green Release
Goal: Send 90% of users to blue and 10% to green.
- Create two ALBs or two target DNS names: blue for current production and green for the new version.
- Create an
AAlias record namedapp.example.com. - Choose Weighted routing.
- Set blue weight to
90. - Create a second weighted record with the same name and type.
- Set green weight to
10. - Test repeatedly with
dig app.example.com. - Increase green weight gradually after health and metrics look good.
- Set green to
100and blue to0when migration is complete.
Hands-on: Failover Routing with Health Checks
Goal: Route to a secondary Region when the primary endpoint fails.
- Deploy a primary endpoint in Region A and a secondary endpoint in Region B.
- Create a Route 53 health check for the primary endpoint using HTTPS and path
/health. - Create an
AAlias record forapp.example.comwith failover type Primary and associate the health check. - Create a second record with the same name and failover type Secondary.
- Simulate primary failure by returning non-200 on
/health. - Confirm Route 53 starts returning the secondary target.
Hybrid DNS with Route 53 Resolver
Use Resolver endpoints when AWS and on-premises DNS must resolve each other:
- Inbound endpoint: on-prem DNS forwards AWS private names into Route 53 Resolver.
- Outbound endpoint: AWS workloads forward selected domains to on-prem DNS.
- Resolver rules: decide which domain suffixes forward where.
Common SOA-C03 Exam Questions
Q: How do you point a root domain to an ALB? Create an Alias A record at the hosted zone apex.
Q: Which routing policy supports active/passive DR? Failover routing with health checks.
Q: How do private EC2 instances resolve on-premises hostnames? Use Route 53 Resolver outbound endpoints and forwarding rules.
What to Learn Next
- AWS VPC Networking - private hosted zones and Resolver endpoints
- AWS Disaster Recovery for CloudOps - DNS failover patterns
- EC2 High Availability and Scalability - load-balanced applications behind DNS
