0
0
AWScloud~30 mins

Failover routing for disaster recovery in AWS - Mini Project: Build & Apply

Choose your learning style9 modes available
Failover routing for disaster recovery
📖 Scenario: You are managing a website that must stay online even if one server location fails. To do this, you want to set up failover routing using AWS Route 53. This means if the main server is down, traffic automatically goes to a backup server.
🎯 Goal: Build a Route 53 failover routing configuration with a primary and secondary record to ensure disaster recovery.
📋 What You'll Learn
Create a hosted zone for the domain example.com
Create a primary A record pointing to the main server IP
Create a secondary A record pointing to the backup server IP
Configure failover routing so traffic switches to backup if primary is unhealthy
💡 Why This Matters
🌍 Real World
Failover routing is critical for websites and applications that must stay online even if one server or data center fails. It helps maintain availability and user trust.
💼 Career
Cloud engineers and DevOps professionals often configure DNS failover to ensure high availability and disaster recovery for production systems.
Progress0 / 4 steps
1
Create the hosted zone
Create a Route 53 hosted zone named example.com using the AWS CLI command aws route53 create-hosted-zone with the name example.com.
AWS
Need a hint?

Use a unique string for --caller-reference like a timestamp or random value.

2
Create the primary A record
Create a JSON file named primary-record.json that defines a Route 53 record set with name example.com, type A, TTL 60, value 192.0.2.1, and failover set to PRIMARY. Use this file to create the record with aws route53 change-resource-record-sets.
AWS
Need a hint?

Remember to add Failover as PRIMARY and a SetIdentifier.

3
Create the secondary A record
Create a JSON file named secondary-record.json that defines a Route 53 record set with name example.com, type A, TTL 60, value 198.51.100.1, and failover set to SECONDARY. Use this file to create the record with aws route53 change-resource-record-sets.
AWS
Need a hint?

Set Failover to SECONDARY and use a different SetIdentifier.

4
Configure health checks and complete failover setup
Create two health checks named healthcheck-primary and healthcheck-secondary for the IPs 192.0.2.1 and 198.51.100.1 respectively using aws route53 create-health-check. Then update the record sets to reference these health checks to enable failover routing.
AWS
Need a hint?

Use different --caller-reference values for each health check.