# Automating the full AWS DRS agent lifecycle: Install, heal, and offboard

DevFeed: [Automating the full AWS DRS agent lifecycle: Install, heal, and offboard](<https://devfeed.tech/articles/automating-the-full-aws-drs-agent-lifecycle-install-heal-and-offboard-112955.md>)

Original publisher: [Read original article](<https://aws.amazon.com/blogs/architecture/automating-the-full-aws-drs-agent-lifecycle-install-heal-and-offboard/>)

Author: Manisha Yadav

Published: 2026-11-02T17:21:29Z

Content type: tutorial

Language: en

Sources: [AWS Architecture Blog](<https://devfeed.tech/sources/aws-architecture-blog.md>)

Topics: [Disaster Recovery](<https://devfeed.tech/topics/disaster-recovery.md>), [Amazon EventBridge](<https://devfeed.tech/topics/amazon-eventbridge.md>), [Amazon EC2](<https://devfeed.tech/topics/amazon-ec2.md>), [Amazon Web Services](<https://devfeed.tech/topics/aws.md>), [Amazon Elastic Block Store (Amazon EBS)](<https://devfeed.tech/topics/amazon-elastic-block-store-amazon-ebs.md>), [Amazon VPC](<https://devfeed.tech/topics/amazon-vpc.md>)

Tags: [advanced-300](<https://devfeed.tech/tags/advanced-300.md>), [agent](<https://devfeed.tech/tags/agent.md>), [amazon-ec2](<https://devfeed.tech/tags/amazon-ec2.md>), [amazon-eventbridge](<https://devfeed.tech/tags/amazon-eventbridge.md>), [automation](<https://devfeed.tech/tags/automation.md>), [aws](<https://devfeed.tech/tags/aws.md>), [aws-elastic-disaster-recovery-drs](<https://devfeed.tech/tags/aws-elastic-disaster-recovery-drs.md>), [aws-systems-manager](<https://devfeed.tech/tags/aws-systems-manager.md>), [disaster](<https://devfeed.tech/tags/disaster.md>), [disaster-recovery](<https://devfeed.tech/tags/disaster-recovery.md>), [drs](<https://devfeed.tech/tags/drs.md>), [ec2](<https://devfeed.tech/tags/ec2.md>), [eventbridge](<https://devfeed.tech/tags/eventbridge.md>), [lambda](<https://devfeed.tech/tags/lambda.md>), [large](<https://devfeed.tech/tags/large.md>), [lifecycle](<https://devfeed.tech/tags/lifecycle.md>), [systems-manager-automation](<https://devfeed.tech/tags/systems-manager-automation.md>), [technical-how-to](<https://devfeed.tech/tags/technical-how-to.md>)

## AI overview

A single EC2 `DR` tag (`yes`, `pause`, or `no`) drives AWS DRS agent onboarding, healing, and offboarding through AWS Systems Manager Automation, State Manager, and Amazon EventBridge, without Lambda functions. State Manager checks `DR=yes` instances every 30 minutes to install or repair the agent and validate registration; EventBridge triggers healing on `STALLED` replication events and offboarding when the tag changes or is removed. Healing restarts the agent service first, then reinstalls in place if needed; infrastructure-related stalls are escalated through SNS. The 30-minute check is a backstop, not protection for the post's customer-configured 15-minute RPO target, and reinstall rescans can exceed that window. Offboarding checks safeguards, records replication state, stops replication, and reports whether teardown and billing stoppage succeeded; terminated instances are protected from source-server deletion. Deployment requires two AWS Regions, DRS and Systems Manager setup, network connectivity, IAM roles and policies, and supporting tools. The post recommends beginning in audit mode and enabling installation and teardown incrementally.

## Source excerpt

Keeping a large Amazon EC2 fleet continuously recoverable with AWS Elastic Disaster Recovery is a lifecycle challenge. This post shows how to automate the full DRS agent lifecycle (install, heal, and offboard) using AWS Systems Manager Automation and Amazon EventBridge, driven by a single EC2 tag and no Lambda functions.