Skip to main content
IAM Policy Map

AWSElasticDisasterRecoveryEc2InstancePolicy

OperatorService roleActivePermissions reviewedShow on mapCompare

Summary

This policy allows installing and using the AWS Replication Agent, which is used by AWS Elastic Disaster Recovery (DRS) to recover source servers that run on EC2 (cross-region or cross-AZ). An IAM role with this policy should be attached (as an EC2 Instance Profile) to the EC2 Instances.

Permissions imported from the AWS Managed Policy Reference Guide; other sections pending editorial review.

Identity

ARN
arn:aws:iam::aws:policy/service-role/AWSElasticDisasterRecoveryEc2InstancePolicy
Default version
v5
Created
Last edited
Services
drs, sts

Control-plane actions (18)

By access level: 5 Read, 2 Tagging, 11 Write.

Control-plane actions by service
ServiceGrantedAccess levels and limitsGranted by
DRS16 of 1105 Read, 1 Tagging, 10 Write; 11 restricted, 1 conditionaldrs:CreateSourceNetwork, drs:CreateSourceServerForDrs, drs:GetAgentCommandForDrs, drs:GetAgentConfirmedResumeInfoForDrs, drs:GetAgentInstallationAssetsForDrs, drs:GetAgentReplicationInfoForDrs, drs:GetAgentRuntimeConfigurationForDrs, drs:SendAgentLogsForDrs, drs:SendAgentMetricsForDrs, drs:SendClientLogsForDrs, drs:SendClientMetricsForDrs, drs:TagResource and 4 more
STS2 of 161 Tagging, 1 Write; 2 restricted, 2 conditionalsts:AssumeRole, sts:TagSession
DRS: 16 actions
  • drs:CreateSourceNetwork (Write)
  • drs:CreateSourceServerForDrs (Write)
  • drs:GetAgentCommandForDrs (Read)
  • drs:GetAgentConfirmedResumeInfoForDrs (Read)
  • drs:GetAgentInstallationAssetsForDrs (Read)
  • drs:GetAgentReplicationInfoForDrs (Read)
  • drs:GetAgentRuntimeConfigurationForDrs (Read)
  • drs:SendAgentLogsForDrs (Write)
  • drs:SendAgentMetricsForDrs (Write)
  • drs:SendClientLogsForDrs (Write)
  • drs:SendClientMetricsForDrs (Write)
  • drs:TagResource (Tagging)
  • drs:UpdateAgentBacklogForDrs (Write)
  • drs:UpdateAgentConversionInfoForDrs (Write)
  • drs:UpdateAgentReplicationInfoForDrs (Write)
  • drs:UpdateAgentSourcePropertiesForDrs (Write)
STS: 2 actions
  • sts:AssumeRole (Write)
  • sts:TagSession (Tagging)

Data-plane actions (0)

By access level: none.

This policy grants no actions in this plane.

Excluded and conditional actions

No patterns are excluded by NotAction or Deny statements.

Resource scope and attachment

Resource scope across granted actions: mixed.

Can be attached: Yes, to users, groups and roles.

Why this tier

  • Grants 13 write, tagging or permissions-management actions, short of full control of any service.
  • 3 granted write or permissions-management actions have no data-plane classification from AWS, so the data-plane rule cannot assess them.

Guidance

Pending editorial review. The permission data on this page comes straight from AWS; this section will be filled in once a reviewed guide exists.

Same service

Same domain

Frequently asked questions

Pending editorial review. The permission data on this page comes straight from AWS; this section will be filled in once a reviewed guide exists.

Policy JSON

Download policy.json

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "DRSEc2InstancePolicy1",
      "Effect": "Allow",
      "Action": [
        "drs:GetAgentInstallationAssetsForDrs",
        "drs:SendClientLogsForDrs",
        "drs:SendClientMetricsForDrs",
        "drs:CreateSourceServerForDrs",
        "drs:CreateSourceNetwork"
      ],
      "Resource": "*"
    },
    {
      "Sid": "DRSEc2InstancePolicy2",
      "Effect": "Allow",
      "Action": [
        "drs:TagResource"
      ],
      "Resource": "arn:aws:drs:*:*:source-server/*",
      "Condition": {
        "StringEquals": {
          "drs:CreateAction": "CreateSourceServerForDrs"
        }
      }
    },
    {
      "Sid": "DRSEc2InstancePolicy3",
      "Effect": "Allow",
      "Action": [
        "drs:TagResource"
      ],
      "Resource": "arn:aws:drs:*:*:source-network/*",
      "Condition": {
        "StringEquals": {
          "drs:CreateAction": "CreateSourceNetwork"
        }
      }
    },
    {
      "Sid": "DRSEc2InstancePolicy4",
      "Effect": "Allow",
      "Action": [
        "drs:SendAgentMetricsForDrs",
        "drs:SendAgentLogsForDrs",
        "drs:UpdateAgentSourcePropertiesForDrs",
        "drs:UpdateAgentReplicationInfoForDrs",
        "drs:UpdateAgentConversionInfoForDrs",
        "drs:GetAgentCommandForDrs",
        "drs:GetAgentConfirmedResumeInfoForDrs",
        "drs:GetAgentRuntimeConfigurationForDrs",
        "drs:UpdateAgentBacklogForDrs",
        "drs:GetAgentReplicationInfoForDrs"
      ],
      "Resource": "arn:aws:drs:*:*:source-server/*"
    },
    {
      "Sid": "DRSEc2InstancePolicy5",
      "Effect": "Allow",
      "Action": [
        "sts:AssumeRole",
        "sts:TagSession"
      ],
      "Resource": [
        "arn:aws:iam::*:role/service-role/DRSCrossAccountAgentAuthorizedRole_*"
      ],
      "Condition": {
        "StringLike": {
          "aws:RequestTag/SourceInstanceARN": "${ec2:SourceInstanceARN}"
        },
        "ForAnyValue:StringEquals": {
          "sts:TransitiveTagKeys": "SourceInstanceARN"
        }
      }
    }
  ]
}

Version history

Current version v5, edited by AWS on 2023-11-27. Version history is recorded from 2026-11-11. Earlier versions are in the IAM console under Policy versions.

Attach snippets

AWS CLI

aws iam attach-role-policy --role-name ROLE_NAME --policy-arn arn:aws:iam::aws:policy/service-role/AWSElasticDisasterRecoveryEc2InstancePolicy
aws iam attach-user-policy --user-name USER_NAME --policy-arn arn:aws:iam::aws:policy/service-role/AWSElasticDisasterRecoveryEc2InstancePolicy
aws iam attach-group-policy --group-name GROUP_NAME --policy-arn arn:aws:iam::aws:policy/service-role/AWSElasticDisasterRecoveryEc2InstancePolicy

CloudFormation

Resources:
  ExampleRole:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument: {}  # replace with your trust policy
      ManagedPolicyArns:
        - arn:aws:iam::aws:policy/service-role/AWSElasticDisasterRecoveryEc2InstancePolicy

Terraform

resource "aws_iam_role_policy_attachment" "service_role_awselasticdisasterrecoveryec2instancepolicy" {
  role       = aws_iam_role.example.name
  policy_arn = "arn:aws:iam::aws:policy/service-role/AWSElasticDisasterRecoveryEc2InstancePolicy"
}

CDK (TypeScript)

role.addManagedPolicy(
  iam.ManagedPolicy.fromAwsManagedPolicyName("service-role/AWSElasticDisasterRecoveryEc2InstancePolicy"),
);

Sources

Pending editorial review. No editorial sources are listed yet.