AWS Elastic Disaster Recovery
AWS Elastic Disaster Recovery (AWS DRS) replicates source servers for disaster recovery, and its replication-agent lifecycle can be automated for large EC2 fleets.1 The described implementation addresses stalled replication that could threaten recovery point objectives (RPOs), as well as continued replication costs when servers leave disaster-recovery scope.1
Agent lifecycle automation
A single DR tag on each EC2 instance controls protection status: values such as yes, pause, and no select whether an instance is protected, quiesced, or offboarded.1 Three AWS Systems Manager Automation documents coordinate onboarding, healing, and offboarding, while EventBridge triggers event-driven healing and offboarding and Systems Manager State Manager runs recurring onboarding checks.1
The onboarding automation installs or repairs the replication agent and maintains its registration; State Manager runs the check every 30 minutes.1 The healing automation responds when AWS DRS reports stalled replication, restarts the agent service, reinstalls the agent if needed, and sends infrastructure problems for escalation through SNS.1 The offboarding automation runs when the tag changes or is deleted, checks safeguards, stops replication, disconnects and deletes the source server, uninstalls the agent, and removes tags.1
The implementation uses Systems Manager Automation documents rather than Lambda functions to reduce maintenance overhead, skips misconfigured tag values safely, and logs whether replication billing has actually stopped after a server is removed from scope.1 The source describes operation across more than 300 Linux and Windows instances with a 15-minute RPO target.1
“An enterprise IT customer with more than 300 Linux and Windows instances in DR scope ran into two of these problems while planning and validating a scheduled DR drill.”
“This exceeds the 15-minute RPO target, so it functions as a safety net rather than the primary defense.”
“AWS Systems Manager State Manager runs onboarding on a 30-minute schedule against tagged instances.”
“On Windows, the first recovery action fires after a configurable delay (30 seconds by default).”