Skip to main content
IAM Policy Map

ServerMigration_ServiceRole

OperatorService roleActivePermissions reviewedShow on mapCompare

Summary

Permissions to allow the AWS Server Migration Service to migrate VMs to EC2: allows the Server Migration Service to place the migrated resources into the customer's EC2 account.

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

Identity

ARN
arn:aws:iam::aws:policy/service-role/ServerMigration_ServiceRole
Default version
v2
Created
Last edited
Services
cloudformation, ec2, iam, s3, sms, ssm

Control-plane actions (48)

By access level: 7 List, 1 Permissions management, 15 Read, 1 Tagging, 24 Write.

Control-plane actions by service
ServiceGrantedAccess levels and limitsGranted by
CloudFormation12 of 1041 List, 6 Read, 5 Write; 11 restricted, 2 conditionalcloudformation:CreateChangeSet, cloudformation:CreateStack, cloudformation:DeleteChangeSet, cloudformation:DeleteStack, cloudformation:DescribeChangeSet, cloudformation:DescribeStackEvents, cloudformation:DescribeStackResource, cloudformation:DescribeStackResources, cloudformation:DescribeStacks, cloudformation:ExecuteChangeSet, cloudformation:GetTemplate, cloudformation:ValidateTemplate
EC216 of 8345 List, 1 Permissions management, 1 Read, 1 Tagging, 8 Write; 7 restricted, 7 conditionalec2:AssociateIamInstanceProfile, ec2:CopyImage, ec2:CopySnapshot, ec2:CreateTags, ec2:DeleteSnapshot, ec2:DeregisterImage, ec2:DescribeImages, ec2:DescribeImportImageTasks, ec2:DescribeInstances, ec2:DescribeSnapshotAttribute, ec2:DescribeSnapshots, ec2:DisassociateIamInstanceProfile and 4 more
IAM3 of 1902 Read, 1 Write; 1 restricted, 1 conditionaliam:GetInstanceProfile, iam:GetRole, iam:PassRole
S36 of 1551 List, 2 Read, 3 Write; 5 restricted, 0 conditionals3:CreateBucket, s3:DeleteBucket, s3:GetBucketAcl, s3:GetBucketLocation, s3:ListAllMyBuckets, s3:PutLifecycleConfiguration
ServerMigrationService8 of 373 Read, 5 Write; 0 restricted, 0 conditionalsms:CreateReplicationJob, sms:DeleteReplicationJob, sms:GetReplicationJobs, sms:GetReplicationRuns, sms:GetServers, sms:ImportServerCatalog, sms:StartOnDemandReplicationRun, sms:UpdateReplicationJob
Systems Manager3 of 1641 Read, 2 Write; 1 restricted, 0 conditionalssm:CancelCommand, ssm:GetCommandInvocation, ssm:SendCommand
CloudFormation: 12 actions
  • cloudformation:CreateChangeSet (Write)
  • cloudformation:CreateStack (Write)
  • cloudformation:DeleteChangeSet (Write)
  • cloudformation:DeleteStack (Write)
  • cloudformation:DescribeChangeSet (Read)
  • cloudformation:DescribeStackEvents (Read)
  • cloudformation:DescribeStackResource (Read)
  • cloudformation:DescribeStackResources (Read)
  • cloudformation:DescribeStacks (List)
  • cloudformation:ExecuteChangeSet (Write)
  • cloudformation:GetTemplate (Read)
  • cloudformation:ValidateTemplate (Read)
EC2: 16 actions
  • ec2:AssociateIamInstanceProfile (Write)
  • ec2:CopyImage (Write)
  • ec2:CopySnapshot (Write)
  • ec2:CreateTags (Tagging)
  • ec2:DeleteSnapshot (Write)
  • ec2:DeregisterImage (Write)
  • ec2:DescribeImages (List)
  • ec2:DescribeImportImageTasks (List)
  • ec2:DescribeInstances (List)
  • ec2:DescribeSnapshotAttribute (List)
  • ec2:DescribeSnapshots (List)
  • ec2:DisassociateIamInstanceProfile (Write)
  • ec2:GetEbsEncryptionByDefault (Read)
  • ec2:ImportImage (Write)
  • ec2:ModifySnapshotAttribute (Permissions management)
  • ec2:ReplaceIamInstanceProfileAssociation (Write)
IAM: 3 actions
  • iam:GetInstanceProfile (Read)
  • iam:GetRole (Read)
  • iam:PassRole (Write)
S3: 6 actions
  • s3:CreateBucket (Write)
  • s3:DeleteBucket (Write)
  • s3:GetBucketAcl (Read)
  • s3:GetBucketLocation (Read)
  • s3:ListAllMyBuckets (List)
  • s3:PutLifecycleConfiguration (Write)
ServerMigrationService: 8 actions
  • sms:CreateReplicationJob (Write)
  • sms:DeleteReplicationJob (Write)
  • sms:GetReplicationJobs (Read)
  • sms:GetReplicationRuns (Read)
  • sms:GetServers (Read)
  • sms:ImportServerCatalog (Write)
  • sms:StartOnDemandReplicationRun (Write)
  • sms:UpdateReplicationJob (Write)
Systems Manager: 3 actions
  • ssm:CancelCommand (Write)
  • ssm:GetCommandInvocation (Read)
  • ssm:SendCommand (Write)

Data-plane actions (5)

By access level: 1 List, 1 Permissions management, 1 Read, 2 Write.

Data-plane actions by service
ServiceGrantedAccess levels and limitsGranted by
S35 of 251 List, 1 Permissions management, 1 Read, 2 Write; 5 restricted, 0 conditionals3:DeleteObject, s3:GetObject, s3:ListBucket, s3:PutObject, s3:PutObjectAcl
S3: 5 actions
  • s3:DeleteObject (Write)
  • s3:GetObject (Read)
  • s3:ListBucket (List)
  • s3:PutObject (Write)
  • s3:PutObjectAcl (Permissions management)

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 29 write, tagging or permissions-management actions, short of full control of any service.
  • Grants data-plane write actions on a data store, but only for scoped resources or under conditions.
  • Grants iam:PassRole, but only for scoped roles or under conditions (for example iam:PassedToService).

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": [
    {
      "Effect": "Allow",
      "Action": [
        "cloudformation:CreateChangeSet",
        "cloudformation:CreateStack"
      ],
      "Resource": "arn:aws:cloudformation:*:*:stack/sms-app-*/*",
      "Condition": {
        "Null": {
          "cloudformation:ResourceTypes": "false"
        },
        "ForAllValues:StringEquals": {
          "cloudformation:ResourceTypes": [
            "AWS::EC2::Instance",
            "AWS::ApplicationInsights::Application",
            "AWS::ResourceGroups::Group"
          ]
        }
      }
    },
    {
      "Effect": "Allow",
      "Action": [
        "cloudformation:DeleteStack",
        "cloudformation:ExecuteChangeSet",
        "cloudformation:DeleteChangeSet",
        "cloudformation:DescribeChangeSet",
        "cloudformation:DescribeStacks",
        "cloudformation:DescribeStackEvents",
        "cloudformation:DescribeStackResource",
        "cloudformation:DescribeStackResources",
        "cloudformation:GetTemplate"
      ],
      "Resource": "arn:aws:cloudformation:*:*:stack/sms-app-*/*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "cloudformation:ValidateTemplate",
        "s3:ListAllMyBuckets"
      ],
      "Resource": "*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "s3:CreateBucket",
        "s3:DeleteBucket",
        "s3:DeleteObject",
        "s3:GetBucketAcl",
        "s3:GetBucketLocation",
        "s3:GetObject",
        "s3:ListBucket",
        "s3:PutObject",
        "s3:PutObjectAcl",
        "s3:PutLifecycleConfiguration"
      ],
      "Resource": "arn:aws:s3:::sms-app-*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "sms:CreateReplicationJob",
        "sms:DeleteReplicationJob",
        "sms:GetReplicationJobs",
        "sms:GetReplicationRuns",
        "sms:GetServers",
        "sms:ImportServerCatalog",
        "sms:StartOnDemandReplicationRun",
        "sms:UpdateReplicationJob"
      ],
      "Resource": "*"
    },
    {
      "Effect": "Allow",
      "Action": "ssm:SendCommand",
      "Resource": [
        "arn:aws:ssm:*::document/AWS-RunRemoteScript",
        "arn:aws:s3:::sms-app-*"
      ]
    },
    {
      "Effect": "Allow",
      "Action": "ssm:SendCommand",
      "Resource": "arn:aws:ec2:*:*:instance/*",
      "Condition": {
        "StringEquals": {
          "ssm:resourceTag/UseForSMSApplicationValidation": [
            "true"
          ]
        }
      }
    },
    {
      "Effect": "Allow",
      "Action": [
        "ssm:CancelCommand",
        "ssm:GetCommandInvocation"
      ],
      "Resource": "*"
    },
    {
      "Effect": "Allow",
      "Action": "ec2:CreateTags",
      "Resource": "arn:aws:ec2:*:*:snapshot/*",
      "Condition": {
        "StringEquals": {
          "ec2:CreateAction": "CopySnapshot"
        }
      }
    },
    {
      "Effect": "Allow",
      "Action": "ec2:CopySnapshot",
      "Resource": "arn:aws:ec2:*:*:snapshot/*",
      "Condition": {
        "StringLike": {
          "aws:RequestTag/SMSJobId": [
            "sms-*"
          ]
        }
      }
    },
    {
      "Effect": "Allow",
      "Action": [
        "ec2:ModifySnapshotAttribute",
        "ec2:DeleteSnapshot"
      ],
      "Resource": "arn:aws:ec2:*:*:snapshot/*",
      "Condition": {
        "StringLike": {
          "ec2:ResourceTag/SMSJobId": [
            "sms-*"
          ]
        }
      }
    },
    {
      "Effect": "Allow",
      "Action": [
        "ec2:CopyImage",
        "ec2:DescribeImages",
        "ec2:DescribeInstances",
        "ec2:DescribeSnapshots",
        "ec2:DescribeSnapshotAttribute",
        "ec2:DeregisterImage",
        "ec2:ImportImage",
        "ec2:DescribeImportImageTasks",
        "ec2:GetEbsEncryptionByDefault"
      ],
      "Resource": "*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "iam:GetRole",
        "iam:GetInstanceProfile"
      ],
      "Resource": "*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "ec2:DisassociateIamInstanceProfile",
        "ec2:AssociateIamInstanceProfile",
        "ec2:ReplaceIamInstanceProfileAssociation"
      ],
      "Resource": "arn:aws:ec2:*:*:instance/*",
      "Condition": {
        "StringLike": {
          "ec2:ResourceTag/aws:cloudformation:stack-id": "arn:aws:cloudformation:*:*:stack/sms-app-*/*"
        }
      }
    },
    {
      "Effect": "Allow",
      "Action": "iam:PassRole",
      "Resource": "*",
      "Condition": {
        "StringEquals": {
          "iam:PassedToService": "ec2.amazonaws.com"
        }
      }
    },
    {
      "Effect": "Allow",
      "Action": "iam:PassRole",
      "Resource": "*",
      "Condition": {
        "StringEqualsIfExists": {
          "iam:PassedToService": "cloudformation.amazonaws.com"
        },
        "StringLike": {
          "iam:AssociatedResourceArn": "arn:aws:cloudformation:*:*:stack/sms-app-*/*"
        }
      }
    }
  ]
}

Version history

Current version v2, edited by AWS on 2020-10-15. 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/ServerMigration_ServiceRole
aws iam attach-user-policy --user-name USER_NAME --policy-arn arn:aws:iam::aws:policy/service-role/ServerMigration_ServiceRole
aws iam attach-group-policy --group-name GROUP_NAME --policy-arn arn:aws:iam::aws:policy/service-role/ServerMigration_ServiceRole

CloudFormation

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

Terraform

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

CDK (TypeScript)

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

Sources

Pending editorial review. No editorial sources are listed yet.