Explain it simply
A spare tire and home insurance
High availability (HA) is the spare tire in your car — a tire bursts and you carry on quickly within the same trip. Disaster recovery (DR) is home insurance plus a relative's house you can move into if your home burns down — it is about starting again after the whole environment is lost.
RTO (recovery time objective) is how long you can take to be back to normal, and RPO (recovery point objective) is how much data you can afford to lose — if the last backup was yesterday, you lose a day. Every DR plan starts from these two numbers.
Problem → Why → Solution
'We are Multi-AZ, so we are covered'
A team runs RDS Multi-AZ, an ALB across three AZs and Auto Scaling groups, and believes DR is done. One night a faulty migration script deletes half the rows in the orders table. Multi-AZ synchronously copies that delete to the standby instantly — doing exactly what it was built to do.
Automated snapshots exist, but in the same Region and the same account. The first restore of the 2 TB database takes six hours, because nobody had practiced it and the IAM role in the runbook had been deleted. The business had assumed one hour of downtime at most — but nobody had ever written that down.
aws rds describe-db-instances --db-instance-identifier orders-db \
--query 'DBInstances[0].MultiAZ'
# true <- protects against an AZ failure, not against DELETE FROM orders
aws rds describe-db-snapshots --db-instance-identifier orders-db \
--query 'DBSnapshots[].AvailabilityZone'
# all in us-east-1, same account <- one compromised admin can delete them allHA is not DR
HA automatically protects against a component (instance, AZ) failing. It does not protect against data corruption, accidental deletion, account compromise or a whole Region being impaired — replication faithfully copies the bad change too. And a backup you have never restored is only a hope.
From RTO/RPO to a strategy
- RPO (recovery point objective)
- The maximum amount of data you may lose in a disaster, measured as time — an RPO of 15 minutes means losing no more than the last 15 minutes of changes.
- RTO (recovery time objective)
- The maximum time allowed between a disaster and the service being usable again.
Engineers do not choose RTO and RPO; the business does, starting from 'what does an hour of downtime cost us?'. Engineering's job is to show the price of each target, because cost climbs steeply as both approach zero. Not every workload needs the same numbers: a payment service and an internal reporting tool belong in different tiers.
AWS describes four DR strategies; the further right you go, the faster and more expensive. In backup & restore, the DR Region holds only backups and the infrastructure is built from IaC after the disaster. In pilot light, data is replicated live and core pieces such as a database replica are running, but app servers are off or sized to zero.
In warm standby, a scaled-down but fully functional copy is running and failover only needs to scale it up — the key difference from pilot light is 'switched off' versus 'small'. In multi-site active/active both Regions serve production traffic at the same time; RTO is lowest, but it is the most complex because writes in two Regions force you to handle data consistency and conflicts.
| Strategy | Typical RTO / RPO | What runs in the DR Region |
|---|---|---|
| Backup & restore | Hours / last backup | Only backups — lowest cost |
| Pilot light | Tens of minutes / minutes | Replicated data + core services, app tier off |
| Warm standby | Minutes / seconds | A full stack, scaled down |
| Multi-site active/active | Near zero / near zero | Full capacity — highest cost and complexity |
RPO is decided by data replication, and each service has its own mechanism: S3 Cross-Region Replication (with S3 Replication Time Control for an SLA-backed replication time), DynamoDB global tables, Aurora Global Database (replication lag typically under a second), RDS cross-Region read replicas, EFS replication and EBS snapshot copy. But replication never replaces backup — it copies the bad delete too, so you always need point-in-time backups as well.
WARM STANDBY WITH ROUTE 53 FAILOVER
-----------------------------------
[Route 53: api.example.com]
failover routing + health check
| :
PRIMARY | : SECONDARY (when
v v primary unhealthy)
us-east-1 (active) us-west-2 (warm standby)
+---------------------------+ +---------------------------+
| ALB -> ECS (6 tasks) | | ALB -> ECS (1 task) |
| Aurora primary cluster |--async->| Aurora secondary cluster |
| S3 bucket |--CRR--->| S3 bucket (replica) |
| AWS Backup: prod-vault |--copy-->| dr-vault (Vault Lock) |
+---------------------------+ +---------------------------+
failover = promote Aurora secondary + scale ECS from 1 to 6- Agree RTO/RPO per workload tier
- Pick the cheapest strategy that fits
- Replicate data AND keep backups
- Automate failover (DNS, scale-up)
- Test it on a schedule
Skip the last step and the other four are a plan on paper. You only learn your real RTO by measuring it.
An AWS Backup plan with a cross-Region copy
{
"BackupPlanName": "prod-daily",
"Rules": [
{
"RuleName": "daily-with-dr-copy",
"TargetBackupVaultName": "prod-vault",
"ScheduleExpression": "cron(0 5 ? * * *)",
"StartWindowMinutes": 60,
"CompletionWindowMinutes": 360,
"Lifecycle": { "DeleteAfterDays": 35 },
"CopyActions": [
{
"DestinationBackupVaultArn":
"arn:aws:backup:us-west-2:111122223333:backup-vault:dr-vault",
"Lifecycle": { "DeleteAfterDays": 35 }
}
]
}
]
}A rule defines when to back up (daily at 05:00 UTC), which vault to use and how long to keep it (35 days). CopyActions copies each recovery point to a vault in another Region (or account), so backups survive even if a whole Region is impaired. Remember the schedule sets your RPO — daily backups mean an RPO of up to 24 hours.
Building cross-Region DR backups with AWS Backup
This script creates a vault in each Region, adds the plan above, selects every resource tagged backup=daily, locks the DR vault with Vault Lock, and then checks that copy jobs are actually landing. Selecting by tag matters: a new database joins the DR plan just by being tagged.
{
"SelectionName": "tagged-daily",
"IamRoleArn": "arn:aws:iam::111122223333:role/AWSBackupDefaultServiceRole",
"ListOfTags": [
{
"ConditionType": "STRINGEQUALS",
"ConditionKey": "backup",
"ConditionValue": "daily"
}
]
}# 1. One vault in the primary Region, one in the DR Region
aws backup create-backup-vault --backup-vault-name prod-vault --region us-east-1
aws backup create-backup-vault --backup-vault-name dr-vault --region us-west-2
# 2. The plan: daily backups, each copied to us-west-2
PLAN_ID=$(aws backup create-backup-plan \
--backup-plan file://backup-plan.json \
--region us-east-1 --query BackupPlanId --output text)
# 3. Assign resources by tag: anything tagged backup=daily
SELECTION_ID=$(aws backup create-backup-selection \
--backup-plan-id "$PLAN_ID" \
--backup-selection file://selection.json \
--region us-east-1 --query SelectionId --output text)
# 4. Lock the DR vault (compliance mode once the 3-day grace period ends)
aws backup put-backup-vault-lock-configuration \
--backup-vault-name dr-vault \
--min-retention-days 7 --max-retention-days 365 \
--changeable-for-days 3 \
--region us-west-2
# 5. Next day: are copies really landing in the DR Region?
aws backup list-copy-jobs --by-state COMPLETED --region us-east-1 \
--query 'CopyJobs[].[ResourceArn,DestinationBackupVaultArn]' --output tableCode breakdown
- A vault per Region
aws backup create-backup-vault --backup-vault-name dr-vault --region us-west-2A backup vault is the container that stores recovery points encrypted with a KMS key. The DR Region needs its own vault before it can be the destination of a copy action.
- Plan + selection
--backup-plan file://backup-plan.json ... --backup-selection file://selection.jsonThe plan says when, for how long and where to copy; the selection says which resources. IamRoleArn is the role AWS Backup assumes to back those resources up.
- Vault Lock in compliance mode
--min-retention-days 7 --max-retention-days 365 --changeable-for-days 3With --changeable-for-days the lock is in compliance mode: after the 3-day grace period nobody — not even the root user — can remove it, and recovery points cannot be deleted before their retention ends. Without it the lock is in governance mode and can be removed by users with permission. This is what protects you from ransomware and a compromised admin.
- Verify the copies
aws backup list-copy-jobs --by-state COMPLETEDHaving a plan is not the same as having copies — copy jobs can fail because of KMS key permissions or vault access policies. Check for COMPLETED jobs and alarm on FAILED ones.
Sample output (ARNs will match your account):
--------------------------------------------------------------------------
| ListCopyJobs |
+------------------------------------------------------------------------+
| arn:aws:rds:us-east-1:111122223333:db:orders-db |
| arn:aws:backup:us-west-2:111122223333:backup-vault:dr-vault |
+------------------------------------------------------------------------+- Route 53 checks /health every 30 s
- 3 consecutive failures = unhealthy
- DNS answers with the SECONDARY record
- Promote DR database, scale up DR app
Primary healthy
Traffic stays in us-east-1
Primary unhealthy
Clients move to us-west-2 as DNS TTLs expire
Route 53 health checks and failover routing
Route 53 health checkers probe the endpoint from many locations. With failover routing the PRIMARY record is tied to a health check, and when it is unhealthy Route 53 answers with the SECONDARY record. With a 30-second interval, a failure threshold of 3 and a 60-second TTL, most clients move within a few minutes.
An important design point: health checks and changed DNS answers happen in Route 53's data plane. Do not write a plan that needs API calls to edit records during a disaster (relying on the control plane) — pre-configured failover is more dependable. For more controlled failover, look at Amazon Application Recovery Controller (ARC).
{
"Type": "HTTPS",
"FullyQualifiedDomainName": "api-use1.example.com",
"ResourcePath": "/health",
"Port": 443,
"RequestInterval": 30,
"FailureThreshold": 3
}{
"Comment": "Active-passive failover for api.example.com",
"Changes": [
{
"Action": "UPSERT",
"ResourceRecordSet": {
"Name": "api.example.com",
"Type": "CNAME",
"SetIdentifier": "primary-us-east-1",
"Failover": "PRIMARY",
"TTL": 60,
"HealthCheckId": "abcdef11-2222-3333-4444-555566667777",
"ResourceRecords": [{ "Value": "api-use1.example.com" }]
}
},
{
"Action": "UPSERT",
"ResourceRecordSet": {
"Name": "api.example.com",
"Type": "CNAME",
"SetIdentifier": "secondary-us-west-2",
"Failover": "SECONDARY",
"TTL": 60,
"ResourceRecords": [{ "Value": "api-usw2.example.com" }]
}
}
]
}HC_ID=$(aws route53 create-health-check \
--caller-reference "api-primary-$(date +%s)" \
--health-check-config file://health-check.json \
--query HealthCheck.Id --output text)
echo "Put $HC_ID into failover-records.json, then:"
aws route53 change-resource-record-sets \
--hosted-zone-id Z0123456789ABCDEFGHIJ \
--change-batch file://failover-records.jsonCross-account copies and the vault access policy
A cross-Region copy protects against a Region being impaired, but not against account compromise, so copy critical backups into a separate backup account too. Enable AWS Backup cross-account backup in the AWS Organizations management account, and give the destination vault an access policy that lets accounts in your organization copy into it. For encrypted copies the KMS key policy must allow it as well.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowCopyFromMyOrganization",
"Effect": "Allow",
"Principal": { "AWS": "*" },
"Action": "backup:CopyIntoBackupVault",
"Resource": "*",
"Condition": {
"StringEquals": { "aws:PrincipalOrgID": "o-a1b2c3d4e5" }
}
}
]
}Testing DR regularly
There are two kinds of DR test: a restore test (take a backup, actually restore it and check the data) and a failover test (actually move traffic to the DR Region). AWS Backup restore testing can run restore tests on a schedule. AWS Fault Injection Service (FIS) runs scenarios such as stopping instances, disrupting network connectivity or an AZ power interruption as controlled experiments, and a stop-condition alarm halts the experiment automatically if things get dangerous.
aws fis list-experiment-templates \
--query 'experimentTemplates[].[id,description]' --output table
aws fis start-experiment --experiment-template-id EXT1a2b3c4d5e6f7a8
# Measure: when did the alarm fire, when did DNS switch, when were we healthy?
aws cloudwatch describe-alarm-history \
--alarm-name checkout-customer-impact --history-item-type StateUpdate \
--max-records 10In production
How DR is run in production
Teams tier their workloads: tier-1 workloads such as payments get warm standby or active/active, internal tools get backup & restore. The DR Region is prepared in advance — service quotas raised to match the primary Region, container images copied with ECR replication, Secrets Manager secrets replicated, KMS multi-Region keys used for encrypted copies. Without these you have backups but cannot restore them.
All infrastructure lives in IaC, so the stack can be deployed into the DR Region with one command. Quarterly game days perform a real failover and compare the measured RTO/RPO with the targets; every gap becomes a backlog item. Test failback (returning to the primary) too — it is often harder than failover and usually forgotten.
Who decides to fail over is agreed in advance too. For hard-to-reverse steps such as promoting a database, an incident commander usually presses the button and automation does the rest — because DNS switching without the database switching can cause split-brain.
Common mistakes
Common mistakes
Treating replication as backup
Multi-AZ, read replicas, global tables and CRR copy every change — including DROP TABLE and ransomware encryption. They are for availability. You still need separate backups with point-in-time recovery and retention.
Keeping backups in the same account and Region
An attacker with admin credentials can delete production and backups together. Copy cross-account and cross-Region, and make them undeletable with Vault Lock.
Never testing a restore
If your first restore happens during an incident, you discover the surprises then — a KMS key not shared to the DR Region, low quotas, a deleted IAM role — and the RTO ends up many times the target.
Failover that depends on the failed Region
If the failover script needs an API, bastion host or CI/CD pipeline in the primary Region, it will not work during the disaster. Make sure the failover tooling can run from the DR Region.
💰 Cost & Cleanup
AWS Backup bills storage per GB-month (warm and cold storage are priced differently) and restores for some resource types. Every cross-Region copy incurs inter-Region data transfer plus storage in the DR Region. Route 53 health checks are billed monthly, with options such as HTTPS and string matching costing more. FIS bills per experiment action-minute. The biggest cost of warm standby and active/active is the compute and database running permanently in the DR Region.
Warning: once a compliance-mode Vault Lock passes its grace period (3 days in this lab), its recovery points and the vault cannot be deleted until retention expires. Remove the lock as soon as the lab is done.
Clean up when you are done
# Within the grace period: remove the lock first
aws backup delete-backup-vault-lock-configuration \
--backup-vault-name dr-vault --region us-west-2
aws backup delete-backup-selection \
--backup-plan-id "$PLAN_ID" --selection-id "$SELECTION_ID" --region us-east-1
aws backup delete-backup-plan --backup-plan-id "$PLAN_ID" --region us-east-1
# A vault must be empty before it can be deleted
for V in prod-vault:us-east-1 dr-vault:us-west-2; do
NAME=${V%%:*}; REGION=${V##*:}
for ARN in $(aws backup list-recovery-points-by-backup-vault \
--backup-vault-name "$NAME" --region "$REGION" \
--query 'RecoveryPoints[].RecoveryPointArn' --output text); do
aws backup delete-recovery-point --backup-vault-name "$NAME" \
--recovery-point-arn "$ARN" --region "$REGION"
done
aws backup delete-backup-vault --backup-vault-name "$NAME" --region "$REGION"
done
# Remove the failover records first (same JSON with "Action": "DELETE")
aws route53 change-resource-record-sets \
--hosted-zone-id Z0123456789ABCDEFGHIJ \
--change-batch file://delete-failover-records.json
aws route53 delete-health-check --health-check-id "$HC_ID"Mini challenge
A backup plan for a one-hour RPO
For the orders database the business accepts an RPO of one hour within the Region and 24 hours if the Region is lost. Write a backup-plan.json that meets this.
- One rule backs up every hour and keeps backups for 2 days
- A second rule backs up daily at 03:00 UTC and keeps them for 30 days
- Only the daily backup is copied to dr-vault in us-west-2, kept for 30 days
- Both rules use prod-vault
Expected: aws backup create-backup-plan --backup-plan file://backup-plan.json returns a BackupPlanId, and get-backup-plan shows two rules — with CopyActions only on the daily rule.
Show hint
AWS Backup cron has six fields — minute, hour, day-of-month, month, day-of-week, year — and one of day-of-month or day-of-week must be '?'. Every hour is cron(0 * ? * * *).
Show solution
{
"BackupPlanName": "orders-rpo-1h",
"Rules": [
{
"RuleName": "hourly-local",
"TargetBackupVaultName": "prod-vault",
"ScheduleExpression": "cron(0 * ? * * *)",
"Lifecycle": { "DeleteAfterDays": 2 }
},
{
"RuleName": "daily-with-dr-copy",
"TargetBackupVaultName": "prod-vault",
"ScheduleExpression": "cron(0 3 ? * * *)",
"Lifecycle": { "DeleteAfterDays": 30 },
"CopyActions": [
{
"DestinationBackupVaultArn":
"arn:aws:backup:us-west-2:111122223333:backup-vault:dr-vault",
"Lifecycle": { "DeleteAfterDays": 30 }
}
]
}
]
}Quick quiz 1 / 3
Quick quiz 2 / 3
Quick quiz 3 / 3
What to remember
- RTO = how long recovery may take, RPO = how much data you may lose — the business sets them
- Backup & restore → pilot light → warm standby → active/active: faster means more expensive
- HA and replication do not replace DR — you need cross-account, cross-Region backups with Vault Lock
- Route 53 health checks + failover routing work in the data plane, so they are dependable during a disaster
- Test restores and failovers regularly with FIS and game days, and measure the real RTO/RPO
Disaster Recovery of Workloads on AWS (whitepaper) — AWS Documentation
AWS Backup Developer Guide — AWS Documentation
Route 53 DNS failover — AWS Documentation