Skip to main content
IAM Policy Map

AWSApplicationMigrationServiceEc2InstancePolicy

OperatorAWS managedActivePermissions reviewedShow on mapCompare

Summary

This policy allows installing and using the AWS Replication Agent, which is used by AWS Application Migration Service (AWS MGN) to migrate 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/AWSApplicationMigrationServiceEc2InstancePolicy
Default version
v2
Created
Last edited
Services
mgn

Control-plane actions (14)

By access level: 5 Read, 1 Tagging, 8 Write.

Control-plane actions by service
ServiceGrantedAccess levels and limitsGranted by
MGN14 of 1475 Read, 1 Tagging, 8 Write; 11 restricted, 1 conditionalmgn:GetAgentCommandForMgn, mgn:GetAgentConfirmedResumeInfoForMgn, mgn:GetAgentInstallationAssetsForMgn, mgn:GetAgentReplicationInfoForMgn, mgn:GetAgentRuntimeConfigurationForMgn, mgn:RegisterAgentForMgn, mgn:SendAgentLogsForMgn, mgn:SendAgentMetricsForMgn, mgn:SendClientLogsForMgn, mgn:TagResource, mgn:UpdateAgentBacklogForMgn, mgn:UpdateAgentConversionInfoForMgn and 2 more
MGN: 14 actions
  • mgn:GetAgentCommandForMgn (Read)
  • mgn:GetAgentConfirmedResumeInfoForMgn (Read)
  • mgn:GetAgentInstallationAssetsForMgn (Read)
  • mgn:GetAgentReplicationInfoForMgn (Read)
  • mgn:GetAgentRuntimeConfigurationForMgn (Read)
  • mgn:RegisterAgentForMgn (Write)
  • mgn:SendAgentLogsForMgn (Write)
  • mgn:SendAgentMetricsForMgn (Write)
  • mgn:SendClientLogsForMgn (Write)
  • mgn:TagResource (Tagging)
  • mgn:UpdateAgentBacklogForMgn (Write)
  • mgn:UpdateAgentConversionInfoForMgn (Write)
  • mgn:UpdateAgentReplicationInfoForMgn (Write)
  • mgn:UpdateAgentSourcePropertiesForMgn (Write)

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 9 write, tagging or permissions-management actions, short of full control of any service.

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": "MgnAgentInstallation",
      "Effect": "Allow",
      "Action": [
        "mgn:SendClientLogsForMgn",
        "mgn:RegisterAgentForMgn",
        "mgn:GetAgentInstallationAssetsForMgn"
      ],
      "Resource": "*"
    },
    {
      "Sid": "MgnAgentReplication",
      "Effect": "Allow",
      "Action": [
        "mgn:SendAgentMetricsForMgn",
        "mgn:SendAgentLogsForMgn",
        "mgn:UpdateAgentSourcePropertiesForMgn",
        "mgn:UpdateAgentReplicationInfoForMgn",
        "mgn:UpdateAgentConversionInfoForMgn",
        "mgn:GetAgentCommandForMgn",
        "mgn:GetAgentConfirmedResumeInfoForMgn",
        "mgn:GetAgentRuntimeConfigurationForMgn",
        "mgn:UpdateAgentBacklogForMgn",
        "mgn:GetAgentReplicationInfoForMgn"
      ],
      "Resource": "arn:aws:mgn:*:*:source-server/*"
    },
    {
      "Sid": "MgnSourceServerTagResource",
      "Effect": "Allow",
      "Action": "mgn:TagResource",
      "Resource": "arn:aws:mgn:*:*:source-server/*",
      "Condition": {
        "StringEquals": {
          "mgn:CreateAction": "RegisterAgentForMgn"
        }
      }
    }
  ]
}

Version history

Current version v2, edited by AWS on 2024-01-03. 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/AWSApplicationMigrationServiceEc2InstancePolicy
aws iam attach-user-policy --user-name USER_NAME --policy-arn arn:aws:iam::aws:policy/AWSApplicationMigrationServiceEc2InstancePolicy
aws iam attach-group-policy --group-name GROUP_NAME --policy-arn arn:aws:iam::aws:policy/AWSApplicationMigrationServiceEc2InstancePolicy

CloudFormation

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

Terraform

resource "aws_iam_role_policy_attachment" "awsapplicationmigrationserviceec2instancepolicy" {
  role       = aws_iam_role.example.name
  policy_arn = "arn:aws:iam::aws:policy/AWSApplicationMigrationServiceEc2InstancePolicy"
}

CDK (TypeScript)

role.addManagedPolicy(
  iam.ManagedPolicy.fromAwsManagedPolicyName("AWSApplicationMigrationServiceEc2InstancePolicy"),
);

Sources

Pending editorial review. No editorial sources are listed yet.