Route53 — DNS & Routing
Domain registration, DNS records, health checks, and intelligent traffic routing across regions
Skills taught: aws.route53, aws.dns-records, aws.hosted-zone, aws.alias-records, aws.health-checks, aws.routing-policies
Route53 — more than just DNS
Route53 is AWS's DNS service and domain registrar. It resolves domain names to IP addresses with 100% SLA uptime — the only AWS service with this guarantee. Beyond basic DNS, Route53 supports intelligent routing: send 10% of traffic to a new version (weighted routing), route users to the closest region (latency-based routing), or fail over to a backup when the primary is down (failover routing).
DNS record types — the essential ones
A RECORD → Maps a hostname to an IPv4 address
example.com → 1.2.3.4
AAAA RECORD → Maps a hostname to an IPv6 address
example.com → 2001:db8::1
CNAME → Maps a hostname to another hostname (canonical name)
www.example.com → example.com
Cannot use CNAME at the zone apex (example.com itself — use ALIAS)
Cannot use CNAME for the root domain
ALIAS → AWS-specific, like CNAME but works at zone apex
example.com → d123.cloudfront.net ✓ works
example.com → my-alb.us-east-1.elb.amazonaws.com ✓ works
Free of charge (no query charges for ALIAS records)
Auto-updates if target IP changes
MX RECORD → Mail server for the domain
example.com → 10 mail.example.com (priority 10)
TXT RECORD → Text data — domain verification, SPF/DKIM for email
example.com → 'v=spf1 include:mailgun.org ~all'
NS RECORD → Which nameservers are authoritative for the domain
Set automatically by Route53 when you create a hosted zone
SOA RECORD → Start of Authority — metadata about the zone
Setting up a domain in Route53
# 1. Create a hosted zone (public — accessible from internet)
aws route53 create-hosted-zone \
--name myapp.com \
--caller-reference $(date +%s)
# Note the 4 NS records returned — add them to your domain registrar
# (If domain is registered in Route53, this is automatic)
# 2. Create DNS records
# Use change-resource-record-sets for all record operations:
aws route53 change-resource-record-sets \
--hosted-zone-id Z1234567890 \
--change-batch '{
"Changes": [
{
"Action": "UPSERT",
"ResourceRecordSet": {
"Name": "myapp.com",
"Type": "A",
"AliasTarget": {
"HostedZoneId": "Z2FDTNDATAQYW2",
"DNSName": "d1234567890.cloudfront.net",
"EvaluateTargetHealth": false
}
}
},
{
"Action": "UPSERT",
"ResourceRecordSet": {
"Name": "www.myapp.com",
"Type": "CNAME",
"TTL": 300,
"ResourceRecords": [{"Value": "myapp.com"}]
}
}
]
}'
Routing policies — intelligent traffic distribution
SIMPLE: Single record, one destination (default)
api.myapp.com → 1.2.3.4
WEIGHTED: Distribute traffic by percentage
api.myapp.com → 1.2.3.4 (weight 90) ← v1 (90% of traffic)
api.myapp.com → 5.6.7.8 (weight 10) ← v2 canary (10% of traffic)
Use: canary deployments, A/B testing
LATENCY-BASED: Route to the lowest-latency region for each user
api.myapp.com → ALB in us-east-1 (for North American users)
api.myapp.com → ALB in ap-south-1 (for Asian users)
api.myapp.com → ALB in eu-west-1 (for European users)
Use: global applications, latency-sensitive APIs
FAILOVER: Primary/secondary with health check
api.myapp.com → Primary (health check every 30s)
api.myapp.com → Secondary (only used if primary fails health check)
Use: disaster recovery, active-passive HA
GEOLOCATION: Route based on user's geographic location
api.myapp.com → EU endpoint (for EU users — GDPR compliance)
api.myapp.com → US endpoint (for US users)
Use: data sovereignty, language/content routing
MULTI-VALUE: Return multiple IPs, DNS-level load balancing
Returns up to 8 healthy IPs — client picks one
Use: simple round-robin without a load balancer
Tip: Health checks make your routing intelligent. Attach a Route53 health check to your records. Route53 pings your endpoint every 10-30 seconds. If it fails 3 consecutive checks, Route53 automatically removes that record from DNS responses. Combined with failover routing, this gives you automatic DNS-level failover when a region goes down.
Frequently Asked Questions
Should I register my domain in Route53 or another registrar?
Registering in Route53 is convenient — DNS is set up automatically, renewals are managed in AWS, and you can use ALIAS records at the apex. Cost is competitive (~$12/year for .com). But if you have an existing registrar you prefer, you can keep the domain there and just use Route53 for DNS by updating the nameservers to Route53's NS records. Most teams eventually consolidate to Route53 for simplicity.