Elastic Disaster Recovery initialization and permissions - AWS Elastic Disaster Recovery

Elastic Disaster Recovery initialization and permissions

In order to use Elastic Disaster Recovery, the service must first be initialized for any AWS Region in which you plan to use Elastic Disaster Recovery.

Initializing Elastic Disaster Recovery

Elastic Disaster Recovery must be initialized upon first use from within the Elastic Disaster Recovery Console. The initialization process occurs automatically once a user accesses the Elastic Disaster Recovery Console. The user is directed to create the default Replication Settings, and upon saving the template, the service is initialized by creating the IAM Roles which are required for the service to work. Learn more about creating the default replication settings as part of the quick start guide.


Elastic Disaster Recovery is NOT compatible with CloudEndure Disaster Recovery.

Elastic Disaster Recovery can only be initialized by the Admin user of your AWS Account. During initialization, the following IAM roles will be created:

  • AWSServiceRoleForElasticDisasterRecovery

  • AWSElasticDisasterRecoveryReplicationServerRole

  • AWSElasticDisasterRecoveryConversionServerRole

  • AWSElasticDisasterRecoveryRecoveryInstanceRole

  • AWSElasticDisasterRecoveryAgentRole

  • AWSElasticDisasterRecoveryFailbackRole

Additional Policies

You can create roles with granular permission for Elastic Disaster Recovery. The service comes with the following pre-defined managed IAM policies:

  • AWSElasticDisasterRecoveryConsoleFullAccess

  • AWSElasticDisasterRecoveryReadOnlyAccess

  • AWSElasticDisasterRecoveryAgentPolicy

  • AWSElasticDisasterRecoveryAgentInstallationPolicy

  • AWSElasticDisasterRecoveryFailbackPolicy

  • AWSElasticDisasterRecoveryFailbackInstallationPolicy

  • AWSElasticDisasterRecoveryInstancePolicy

  • AWSElasticDisasterRecoveryServiceRolePolicy

Learn more about Elastic Disaster Recovery roles and managed policies.

Manually initializing DRS

You can manually initialize Elastic Disaster Recovery through the API. This can help you automate service initialization through script when initializing multiple accounts.


You will need to create the Replication Settings Template after initializing the service.

To initialize Elastic Disaster Recovery manually, create the following IAM Roles through the IAM CreateRoleAPI. Learn more about creating IAM roles in the AWS IAM documentation.

Creation of each role must include the following parameters:

Role name Path Trusted Entity
















Example using the AWS CLI: aws iam create-role --path "/service-role/" --role-name AWSElasticDisasterRecoveryReplicationServerRole --assume-role-policy-document '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal": {"Service":"ec2.amazonaws.com"},"Action":"sts:AssumeRole"}]}'

After the roles have been created, attach the following AWS managed policies to the roles through the IAM AttachRolePolicy API. Learn more about adding and removing IAM identity permissions in the AWS IAM documentation.

  1. Attach Managed Policy AWSElasticDisasterRecoveryAgentPolicy to Role AWSElasticDisasterRecoveryAgentRole

  2. Attach Managed Policy AWSElasticDisasterRecoveryFailbackPolicy to Role AWSElasticDisasterRecoveryFailbackRole

  3. Attach Managed Policy AWSElasticDisasterRecoveryConversionServerPolicy to Role AWSElasticDisasterRecoveryConversionServerRole

  4. Attach Managed Policy AWSElasticDisasterRecoveryRecoveryInstancePolicy to Role AWSElasticDisasterRecoveryRecoveryInstanceRole

  5. Attach Managed Policy AWSElasticDisasterRecoveryReplicationServerPolicy to Role AWSElasticDisasterRecoveryReplicationServerRole


Roles must also have a trust policy defined. The trust policy needs to define source identity and source account for security reasons, and allow the service to call SetSourceIdentity and AssumeRole. See the following policy examples.

Example 1: creating a role for the AWSElasticDisasterRecoveryAgentRole with trusted entity relationships via the CreateRole API:

Role: AWSElasticDisasterRecoveryAgentRole

$ aws iam create-role --path "/service-role/" --role-name AWSElasticDisasterRecoveryAgentRole --assume-role-policy-document file://agent-source-drs-trust-policy.json


{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "drs.amazonaws.com" }, "Action": [ "sts:AssumeRole", "sts:SetSourceIdentity" ], "Condition": { "StringLike": { "sts:SourceIdentity": "s-*", "aws:SourceAccount": "1234567891011" } } } ] }

Example 2: creating a role for the AWSElasticDisasterRecoveryFailbackRole with trusted entity relationships via the CreateRole API:

Role: AWSElasticDisasterRecoveryFailbackRole

$ aws iam create-role --path "/service-role/" --role-name AWSElasticDisasterRecoveryFailbackRole --assume-role-policy-document file://failback-source-drs-trust-policy.json


{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "drs.amazonaws.com" }, "Action": [ "sts:AssumeRole", "sts:SetSourceIdentity" ], "Condition": { "StringLike": { "aws:SourceAccount": "1234567891011", "sts:SourceIdentity": "i-*" } } } ] }

Example 3: creating roles for the AWSElasticDisasterRecoveryConversionServerRole , AWSElasticDisasterRecoveryRecoveryInstanceRole , and AWSElasticDisasterRecoveryReplicationServerRole with trusted entity relationships via the CreateRole API:

Role: AWSElasticDisasterRecoveryConversionServerRole

$ aws iam create-role --path "/service-role/" --role-name AWSElasticDisasterRecoveryConversionServerRole --assume-role-policy-document file://source-drs-trust-policy.json

Role: AWSElasticDisasterRecoveryRecoveryInstanceRole

$ aws iam create-role --path "/service-role/" --role-name AWSElasticDisasterRecoveryRecoveryInstanceRole --assume-role-policy-document file://source-drs-trust-policy.json

Role: AWSElasticDisasterRecoveryReplicationServerRole

$ aws iam create-role --path "/service-role/" --role-name AWSElasticDisasterRecoveryReplicationServerRole --assume-role-policy-document file://source-drs-trust-policy.json


{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "ec2.amazonaws.com" }, "Action": "sts:AssumeRole" } ] }

Once the policies are attached to the roles, run the aws drs initialize-service command. This will automatically create the Service Linked Role (AWSServiceRoleForElasticDisasterRecovery), create Instance Profiles, add Roles to Instance Profiles, and will finish service initialization.

Learn more about Elastic Disaster Recovery roles and managed policies.