
A DRS failover and failback drill, step by step, with the CloudWatch alarms that told us it worked
A recovery drill on four Windows servers in me-central-1, timed minute by minute. The five CloudWatch alarms created before launch that decided the pass, the three things that broke and the fix for each, and the failback through the DRS Failback Client, which took longer than the failover because of one firewall rule.
A DRS failover and failback drill, step by step, with the CloudWatch alarms that told us it worked
What this article covers
This is a field report from a recovery drill on AWS Elastic Disaster Recovery for a financial institution's Windows estate in me-central-1. It covers the checks before the drill, the recovery launch, the CloudWatch alarms we watched to decide the drill had passed, and the failback, which is the step most teams never rehearse.
It is written for the engineer who owns the DR runbook and has to prove, with evidence, that recovery works. It is not an introduction to DRS.
The service is AWS Elastic Disaster Recovery. I call it DRS here.
Terms I use:
- Source server. The protected machine, on-premises or in another region, with the AWS Replication Agent installed.
- Staging area. The subnet in the recovery region where DRS keeps a small replication server and the EBS volumes that receive the replicated blocks.
- Recovery instance. The EC2 instance DRS launches from a point-in-time snapshot when you start a recovery or a drill.
- Drill. A recovery launched with the drill flag. Replication from the source continues while the drill instance runs.
- Failback. Reversing replication so the recovery instance becomes the source and the original site receives the data, then cutting back.
The drill, in numbers:
Item | Value |
|---|---|
Source servers in the drill | 4 (core application, SQL Server, file and integration server, domain controller) |
OS | Windows Server 2016 and 2019 |
RPO target | 15 minutes |
RTO target | 4 hours |
Replication lag at drill start | 8 seconds |
Worst lag in the 7 days before | 3 min 40 s, during the nightly backup window |
Job start to first application alarm OK | 50 minutes |
Failback, start to forward replication re-established | 3 h 50 min, for 1.1 TB |

A drill is not done when the recovery instance shows "running". It is done when the application alarms go green in the recovery region and replication is flowing back the other way.
Why we drilled
The replication agent on the Windows Server 2016 core application server had stopped reporting and had to be recovered. Once it was healthy again, nobody could say with evidence that the protected servers would come up and serve the application. The DRS console said Healthy. That is a statement about replication, not about recovery.
So we scheduled a drill with a written pass condition, agreed before anyone pressed a button: every application alarm in the recovery region reaches OK within the RTO, and failback completes without a resync from zero.
Before the drill
Five checks, in order. Each one has stopped a drill for someone.
1. Lag per server, not per wave. The DRS console shows a summary that reads healthy while one server inside it is behind. I learned that on the migration side, where a wave summary hid a server that was 29 days stalled. Read lag per server:
aws drs describe-source-servers \ --query "items[].{id:sourceServerID,host:sourceProperties.identificationHints.hostname,lag:dataReplicationInfo.lagDuration,state:dataReplicationInfo.dataReplicationState}" \ --output tableEvery row must read
CONTINUOUS with a lag inside the RPO. A server in STALLED or INITIATING does not go in the drill. The worst lag we had seen in the week before was 3 minutes 40 seconds on the SQL server, every night at 23:00 when the on-premises backup wrote to the same disks. Inside the 15-minute RPO, so it stayed in.2. Launch template. Open the EC2 launch template DRS created for each source server and check four fields: subnet is the recovery subnet, not the staging subnet; instance type is right-sized, not the default; the instance profile has
AmazonSSMManagedInstanceCore ; the security group allows the application ports and nothing from 0.0.0.0/0.3. Launch settings. Confirm "Copy private IP" matches what the application expects. We did not check this carefully enough. See failure 2.
4. Staging subnet capacity. DRS launches a temporary conversion server in the staging subnet during every recovery. A subnet with no free IPs fails the job before the recovery instance exists. Check free addresses, not the CIDR.
5. Alarms exist before the drill. If the alarms are created after the instance boots, there is no record of the transition. Create them first, in
INSUFFICIENT_DATA , and watch them move.The alarm set
This is the part the AWS documentation does not give you. Five alarms per recovered server, created in the recovery region before the drill, all targeting the instance by tag rather than by ID, because the ID does not exist yet.
Alarm | Metric | Threshold | What it proves |
|---|---|---|---|
Instance reachable | AWS/EC2 StatusCheckFailed | > 0 for 2 periods of 1 min | The OS booted and the hypervisor can reach it |
Agent alive | CWAgent Memory % Committed Bytes In Use | Missing data for 5 min = ALARM | The CloudWatch agent started, so the SSM path is also up |
Disk | CWAgent LogicalDisk % Free Space | < 15% | The data volumes mounted with the expected letters |
Application port | Custom metric from a Run Command probe | Test-NetConnection fails 2 of 3 | The service is listening |
Application health | Custom metric from the app's own health endpoint | HTTP not 200 for 3 min | The application serves, not just the OS |
The first three are standard. The last two are a Systems Manager Run Command document that runs every minute for the length of the drill and pushes
1 or 0 to a custom namespace:$port = Test-NetConnection -ComputerName localhost -Port 1433 -InformationLevel Quiet$value = if ($port) { 1 } else { 0 }aws cloudwatch put-metric-data --namespace DRDrill --metric-name AppPortOpen ` --dimensions Server=$env:COMPUTERNAME --value $value --region me-central-1The metric must appear in the
DRDrill namespace within two minutes of the instance passing status checks. If it does not, the instance profile or the CloudWatch endpoint route is wrong, and that is a finding on its own. It was ours. See failure 1.The recovery launch
Start the drill from the CLI so the timestamp is in your terminal history:
aws drs start-recovery \ --source-servers sourceServerID=s-0123456789abcdef0 \ --is-drill \ --region me-central-1The output gives a job ID. Watch it:
aws drs describe-job-log-items --job-id drsjob-0123456789abcdef0 \ --query "items[].{t:logDateTime,e:event,s:eventData.sourceServerID}" --output tableThe log must show, in order:
JOB_START , SNAPSHOT_START , SNAPSHOT_END , CONVERSION_START , CONVERSION_END , LAUNCH_START , LAUNCH_END . A gap of more than a few minutes between CONVERSION_START and CONVERSION_END on a Windows server usually means driver injection is slow, not failed. Wait before you intervene.What we recorded, minutes from job start:
Minute | Event |
|---|---|
0 | JOB_START , four servers |
2 | Conversion servers launched in the staging subnet |
19 | Last CONVERSION_END (the SQL server, 1.1 TB across three volumes) |
22 | All four recovery instances in running |
29 | EC2 status checks 2/2 on all four |
33 | CloudWatch agent metrics arriving from three of four. Failure 1 |
41 | Agent metrics from the fourth, after the fix |
44 | Application port probe green on three of four. Failure 2 |
50 | Application health endpoint 200 on all four. Drill passed the first half |
What went wrong, and the fix for each
Three things broke. None of them was DRS.
Failure 1: The recovery subnet had no path to the CloudWatch and SSM endpoints
What I saw
three servers reported agent metrics at minute 33. The core application server did not. Status checks were 2/2. The heartbeat alarm sat in
INSUFFICIENT_DATA .Why
the staging subnet had interface endpoints for
ssm , ssmmessages , ec2messages and monitoring . The recovery subnet was built later, by a different ticket, and had none of them and no NAT route. Three servers had landed in a second recovery subnet that did. One had not.Fix
associate the existing endpoints with the second subnet. Eight minutes, no relaunch. The alarm went green at minute 41.
What to know before you do it
DRS launch templates can point servers in the same drill at different subnets. Check every template, not the first one.
Failure 2: The application bound to an IP address that did not exist
What I saw
the port probe stayed at
0 on the core application server after the OS and agent were up. The Windows service was running. netstat showed it listening on the old on-premises address.Why
the service configuration file carried a static bind address. "Copy private IP" was off in the launch settings, so the recovery instance got a new address from the recovery subnet, and the service bound to one it did not have.
Fix
for the drill, edit the bind address to
0.0.0.0 and restart the service. For the runbook, turn on "Copy private IP" for that server and move the recovery subnet to a CIDR that can carry the source address. Six minutes to the fix, and the probe went to 1 at minute 50.Failure 3: The failback client could not reach the recovery instance
What I saw
the DRS Failback Client booted on the original VM, authenticated, and then waited on "connecting to replication server" for twenty minutes.
Why
the on-premises firewall allowed outbound TCP 1500 from the production VLAN, where the original servers lived. The failback client had been booted on a rescue VLAN. Nothing on that VLAN could reach AWS on 1500.
Fix
a firewall rule for the rescue VLAN. That took longer than anything in the drill, because it was a change on someone else's device. One hour and ten minutes of the 3 h 50 min failback was that rule.
What to know before you do it
A drill instance is a real EC2 instance on a real bill. Terminate it through DRS, not through the EC2 console, so DRS clears the drill state. Leaving it running also means the next drill on the same server replaces it.
Failback
This is the step that gets skipped, and it is the one the auditor asks about.
For an on-premises source, failback runs through the DRS Failback Client, booted on the original hardware or VM. It registers the machine as a recovery target and pulls the data from the recovery instance. For a source that is itself in AWS, DRS does the reverse replication without the client.
The sequence we ran:
- On the recovery instance, confirm the application is quiesced. Open writes are lost at the cut.
- Boot the Failback Client on the original VM and authenticate. See failure 3 for what happened next.
- Watch the new source server entry. Its replication state must reach
CONTINUOUSbefore anything else happens. The reverse initial sync of 1.1 TB took 2 hours 10 minutes on a 200 Mbit/s link.
- Launch the failback, which boots the original site from the replicated data.
- Re-establish forward replication from the original site back to the recovery region. Until this reads
CONTINUOUS, you have no DR.
The pass condition for failback is step 5, not step 4. A site that is running but no longer protected has not failed back; it has moved the outage into the future.
aws drs describe-source-servers \ --query "items[?dataReplicationInfo.dataReplicationState!='CONTINUOUS'].[sourceServerID,dataReplicationInfo.dataReplicationState]" \ --output tableThis must return an empty table before the drill is closed. Ours did at 3 hours 50 minutes after the failback started.
What the runbook needs to say
- The pass condition is written down before the drill and is about alarms, not about an instance state.
- Lag is checked per server. A wave summary is not evidence.
- Alarms are created before the launch, targeted by tag, and their history is exported after the drill as the record.
- Every launch template is checked, because servers in one drill can land in different subnets.
- The application probe runs from Systems Manager, not from someone's laptop.
- Failback is in scope for every drill, and the firewall rule for the failback client is in place before drill day.
- Drill instances are terminated through DRS.
If you have run a DRS drill where the failback took longer than the failover, I would like to know what the slow step was. Ours was a firewall rule.
P.S. The thing that made this drill useful was the alarm history export afterwards. Twenty alarms, timestamps, the exact minute each went green. That one CSV answered every question the risk team asked.
References
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article