Skip to main content
IAM Policy Map

AWSMigrationHubRefactorSpaces-SSMAutomationPolicy

OperatorService roleActivePermissions reviewedShow on mapCompare

Summary

Use in the IAM service role passed to the SSM Automation document AWSRefactorSpaces-CreateResources to grant permissions required to run the automation. The policy grants read/write access to EC2 tags in order to track automation progress. When the Refactor Spaces environment's network bridge is enabled, the automation also adds the environment's security group to the EC2 instance to permit traffic from other Refactor Spaces services in the environment. The policy also grants access to the Application Migration Service's post launch actions SSM parameters.

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

Identity

ARN
arn:aws:iam::aws:policy/service-role/AWSMigrationHubRefactorSpaces-SSMAutomationPolicy
Default version
v1
Created
Last edited
Services
ec2, ssm

Control-plane actions (6)

By access level: 2 List, 1 Read, 2 Tagging, 1 Write.

Control-plane actions by service
ServiceGrantedAccess levels and limitsGranted by
EC25 of 8342 List, 2 Tagging, 1 Write; 3 restricted, 2 conditionalec2:CreateTags, ec2:DeleteTags, ec2:DescribeInstanceStatus, ec2:DescribeInstances, ec2:ModifyInstanceAttribute
Systems Manager1 of 1641 Read; 1 restricted, 0 conditionalssm:GetParameters
EC2: 5 actions
  • ec2:CreateTags (Tagging)
  • ec2:DeleteTags (Tagging)
  • ec2:DescribeInstanceStatus (List)
  • ec2:DescribeInstances (List)
  • ec2:ModifyInstanceAttribute (Write)
Systems Manager: 1 actions
  • ssm:GetParameters (Read)

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 3 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": [
    {
      "Effect": "Allow",
      "Action": [
        "ec2:DescribeInstanceStatus",
        "ec2:DescribeInstances"
      ],
      "Resource": "*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "ec2:ModifyInstanceAttribute"
      ],
      "Resource": "arn:aws:ec2:*:*:instance/*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceTag/refactor-spaces:ssm:optin": "true"
        }
      }
    },
    {
      "Effect": "Allow",
      "Action": [
        "ec2:ModifyInstanceAttribute"
      ],
      "Resource": "arn:aws:ec2:*:*:security-group/*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "ec2:CreateTags",
        "ec2:DeleteTags"
      ],
      "Resource": "arn:aws:ec2:*:*:instance/*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceTag/refactor-spaces:ssm:optin": "true"
        },
        "ForAllValues:StringEquals": {
          "aws:TagKeys": "refactor-spaces:ssm:environment-id"
        }
      }
    },
    {
      "Effect": "Allow",
      "Action": "ssm:GetParameters",
      "Resource": "arn:aws:ssm:*:*:parameter/ManagedByAWSApplicationMigrationService-*"
    }
  ]
}

Version history

Current version v1, edited by AWS on 2023-08-10. 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/AWSMigrationHubRefactorSpaces-SSMAutomationPolicy
aws iam attach-user-policy --user-name USER_NAME --policy-arn arn:aws:iam::aws:policy/service-role/AWSMigrationHubRefactorSpaces-SSMAutomationPolicy
aws iam attach-group-policy --group-name GROUP_NAME --policy-arn arn:aws:iam::aws:policy/service-role/AWSMigrationHubRefactorSpaces-SSMAutomationPolicy

CloudFormation

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

Terraform

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

CDK (TypeScript)

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

Sources

Pending editorial review. No editorial sources are listed yet.