Route 53 Health Checks & DNS Failover
Part of the AWS Roadmap
In short
Servers fail at 2 a.m., usually on the day of a big sale. Health checks and failover records let DNS quietly send users to a backup before anyone posts a complaint online.
Route 53 health checks regularly test an endpoint, and failover routing uses them to answer with a backup endpoint, such as a static S3 page, when the primary is unhealthy.

Think of it like this
The wedding caterer's backup
A Lucknow wedding planner calls the main caterer every hour on the big day. If three calls in a row go unanswered, she switches to the backup caterer on her list. Guests still get dinner. A health check is the hourly call, and failover routing is switching to the backup number.
Watch it happen
From healthy to failed over
1/5Health checkers in several locations request https://shop.priyabakes.in/health every 30 seconds.
The big ideas
What you need to know
Endpoint checks
Probe an IP or domain over HTTP, HTTPS or TCP. You can require a specific string in the response body.
Calculated and alarm checks
A calculated check combines other checks. A CloudWatch alarm check goes unhealthy when an alarm fires, useful for private resources.
Failover records
One PRIMARY and one SECONDARY record with the same name. Route 53 answers with the primary while its health check passes.
Evaluate target health
Alias records to load balancers can set EvaluateTargetHealth so they inherit health from the targets without a separate check.
See it in code
Walk through the code
1aws route53 create-health-check \2 --caller-reference "shop-hc-$(date +%s)" \3 --health-check-config '{4 "Type": "HTTPS",5 "FullyQualifiedDomainName": "origin.priyabakes.in",6 "ResourcePath": "/health",7 "Port": 443,8 "RequestInterval": 30,9 "FailureThreshold": 310 }'11 12# The primary record then references the health check:13# "SetIdentifier": "primary",14# "Failover": "PRIMARY",15# "HealthCheckId": "abcd1234-...",16# and a second record uses "Failover": "SECONDARY"1/4Create a health check. The caller reference only needs to be unique.
AWS CLI v2. Make /health check the things that really matter, such as the database connection, not just that the web server is up.
Save yourself the pain
Common mistakes
Oops
Pointing the health check at the home page that returns 200 even when the database is down.
Do this instead
Build a /health endpoint that checks key dependencies and returns an error when the app can't serve real requests.
Oops
Blocking the Route 53 health checkers in the security group, so the primary always looks down.
Do this instead
Allow the Route 53 health checker IP ranges published by AWS, or use a CloudWatch alarm based check for private endpoints.
Your mission
Fail over to a sorry page
Quick check
Your primary's health check is failing. Which record does Route 53 return for a failover pair?
Go deeper
- 1Create a health check on a test endpoint and watch its status change when you stop the server.
- 2Set up primary and secondary failover records using that health check.
- 3Add a CloudWatch alarm that emails you when the health check fails.
More topics at this stop
Stuck on this topic? Ask an Insider
Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.