Skip to main content
IAM Policy Map

AWSBatchServiceRole

OperatorService roleActivePermissions reviewedShow on mapCompare

Summary

Policy for AWS Batch service role which allows access to related services including EC2, Autoscaling, EC2 Container service and Cloudwatch Logs.

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

Identity

ARN
arn:aws:iam::aws:policy/service-role/AWSBatchServiceRole
Default version
v14
Created
Last edited
Services
autoscaling, ec2, ecs, iam, logs

Control-plane actions (68)

By access level: 27 List, 7 Read, 3 Tagging, 31 Write.

Control-plane actions by service
ServiceGrantedAccess levels and limitsGranted by
EC2 Auto Scaling15 of 685 List, 1 Tagging, 9 Write; 0 restricted, 0 conditionalautoscaling:CreateAutoScalingGroup, autoscaling:CreateLaunchConfiguration, autoscaling:CreateOrUpdateTags, autoscaling:DeleteAutoScalingGroup, autoscaling:DeleteLaunchConfiguration, autoscaling:DescribeAccountLimits, autoscaling:DescribeAutoScalingGroups, autoscaling:DescribeAutoScalingInstances, autoscaling:DescribeLaunchConfigurations, autoscaling:DescribeScalingActivities, autoscaling:PutNotificationConfiguration, autoscaling:SetDesiredCapacity and 3 more
EC224 of 83416 List, 1 Tagging, 7 Write; 1 restricted, 1 conditionalec2:CancelSpotFleetRequests, ec2:CreateLaunchTemplate, ec2:CreateTags, ec2:DeleteLaunchTemplate, ec2:DescribeAccountAttributes, ec2:DescribeImageAttribute, ec2:DescribeImages, ec2:DescribeInstanceAttribute, ec2:DescribeInstanceStatus, ec2:DescribeInstances, ec2:DescribeKeyPairs, ec2:DescribeLaunchTemplateVersions and 12 more
Elastic Container Service21 of 925 List, 5 Read, 1 Tagging, 10 Write; 1 restricted, 0 conditionalecs:CreateCluster, ecs:DeleteCluster, ecs:DeregisterContainerInstance, ecs:DeregisterTaskDefinition, ecs:DescribeClusters, ecs:DescribeContainerInstances, ecs:DescribeTaskDefinition, ecs:DescribeTasks, ecs:ListAccountSettings, ecs:ListClusters, ecs:ListContainerInstances, ecs:ListTaskDefinitionFamilies and 9 more
IAM4 of 1902 Read, 2 Write; 2 restricted, 2 conditionaliam:CreateServiceLinkedRole, iam:GetInstanceProfile, iam:GetRole, iam:PassRole
CloudWatch Logs4 of 1331 List, 3 Write; 0 restricted, 0 conditionallogs:CreateLogGroup, logs:CreateLogStream, logs:DescribeLogGroups, logs:PutLogEvents
EC2 Auto Scaling: 15 actions
  • autoscaling:CreateAutoScalingGroup (Write)
  • autoscaling:CreateLaunchConfiguration (Write)
  • autoscaling:CreateOrUpdateTags (Tagging)
  • autoscaling:DeleteAutoScalingGroup (Write)
  • autoscaling:DeleteLaunchConfiguration (Write)
  • autoscaling:DescribeAccountLimits (List)
  • autoscaling:DescribeAutoScalingGroups (List)
  • autoscaling:DescribeAutoScalingInstances (List)
  • autoscaling:DescribeLaunchConfigurations (List)
  • autoscaling:DescribeScalingActivities (List)
  • autoscaling:PutNotificationConfiguration (Write)
  • autoscaling:SetDesiredCapacity (Write)
  • autoscaling:SuspendProcesses (Write)
  • autoscaling:TerminateInstanceInAutoScalingGroup (Write)
  • autoscaling:UpdateAutoScalingGroup (Write)
EC2: 24 actions
  • ec2:CancelSpotFleetRequests (Write)
  • ec2:CreateLaunchTemplate (Write)
  • ec2:CreateTags (Tagging)
  • ec2:DeleteLaunchTemplate (Write)
  • ec2:DescribeAccountAttributes (List)
  • ec2:DescribeImageAttribute (List)
  • ec2:DescribeImages (List)
  • ec2:DescribeInstanceAttribute (List)
  • ec2:DescribeInstanceStatus (List)
  • ec2:DescribeInstances (List)
  • ec2:DescribeKeyPairs (List)
  • ec2:DescribeLaunchTemplateVersions (List)
  • ec2:DescribeSecurityGroups (List)
  • ec2:DescribeSpotFleetInstances (List)
  • ec2:DescribeSpotFleetRequestHistory (List)
  • ec2:DescribeSpotFleetRequests (List)
  • ec2:DescribeSpotInstanceRequests (List)
  • ec2:DescribeSpotPriceHistory (List)
  • ec2:DescribeSubnets (List)
  • ec2:DescribeVpcClassicLink (List)
  • ec2:ModifySpotFleetRequest (Write)
  • ec2:RequestSpotFleet (Write)
  • ec2:RunInstances (Write)
  • ec2:TerminateInstances (Write)
Elastic Container Service: 21 actions
  • ecs:CreateCluster (Write)
  • ecs:DeleteCluster (Write)
  • ecs:DeregisterContainerInstance (Write)
  • ecs:DeregisterTaskDefinition (Write)
  • ecs:DescribeClusters (Read)
  • ecs:DescribeContainerInstances (Read)
  • ecs:DescribeTaskDefinition (Read)
  • ecs:DescribeTasks (Read)
  • ecs:ListAccountSettings (Read)
  • ecs:ListClusters (List)
  • ecs:ListContainerInstances (List)
  • ecs:ListTaskDefinitionFamilies (List)
  • ecs:ListTaskDefinitions (List)
  • ecs:ListTasks (List)
  • ecs:RegisterTaskDefinition (Write)
  • ecs:RunTask (Write)
  • ecs:StartTask (Write)
  • ecs:StopTask (Write)
  • ecs:TagResource (Tagging)
  • ecs:UpdateCluster (Write)
  • ecs:UpdateContainerAgent (Write)
IAM: 4 actions
  • iam:CreateServiceLinkedRole (Write)
  • iam:GetInstanceProfile (Read)
  • iam:GetRole (Read)
  • iam:PassRole (Write)
CloudWatch Logs: 4 actions
  • logs:CreateLogGroup (Write)
  • logs:CreateLogStream (Write)
  • logs:DescribeLogGroups (List)
  • logs:PutLogEvents (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 34 write, tagging or permissions-management actions, short of full control of any service.
  • 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": [
    {
      "Sid": "AWSBatchPolicyStatement1",
      "Effect": "Allow",
      "Action": [
        "ec2:DescribeAccountAttributes",
        "ec2:DescribeInstances",
        "ec2:DescribeInstanceStatus",
        "ec2:DescribeInstanceAttribute",
        "ec2:DescribeSubnets",
        "ec2:DescribeSecurityGroups",
        "ec2:DescribeKeyPairs",
        "ec2:DescribeImages",
        "ec2:DescribeImageAttribute",
        "ec2:DescribeSpotInstanceRequests",
        "ec2:DescribeSpotFleetInstances",
        "ec2:DescribeSpotFleetRequests",
        "ec2:DescribeSpotPriceHistory",
        "ec2:DescribeSpotFleetRequestHistory",
        "ec2:DescribeVpcClassicLink",
        "ec2:DescribeLaunchTemplateVersions",
        "ec2:CreateLaunchTemplate",
        "ec2:DeleteLaunchTemplate",
        "ec2:RequestSpotFleet",
        "ec2:CancelSpotFleetRequests",
        "ec2:ModifySpotFleetRequest",
        "ec2:TerminateInstances",
        "ec2:RunInstances",
        "autoscaling:DescribeAccountLimits",
        "autoscaling:DescribeAutoScalingGroups",
        "autoscaling:DescribeLaunchConfigurations",
        "autoscaling:DescribeAutoScalingInstances",
        "autoscaling:DescribeScalingActivities",
        "autoscaling:CreateLaunchConfiguration",
        "autoscaling:CreateAutoScalingGroup",
        "autoscaling:UpdateAutoScalingGroup",
        "autoscaling:SetDesiredCapacity",
        "autoscaling:DeleteLaunchConfiguration",
        "autoscaling:DeleteAutoScalingGroup",
        "autoscaling:CreateOrUpdateTags",
        "autoscaling:SuspendProcesses",
        "autoscaling:PutNotificationConfiguration",
        "autoscaling:TerminateInstanceInAutoScalingGroup",
        "ecs:DescribeClusters",
        "ecs:DescribeContainerInstances",
        "ecs:DescribeTaskDefinition",
        "ecs:DescribeTasks",
        "ecs:ListAccountSettings",
        "ecs:ListClusters",
        "ecs:ListContainerInstances",
        "ecs:ListTaskDefinitionFamilies",
        "ecs:ListTaskDefinitions",
        "ecs:ListTasks",
        "ecs:CreateCluster",
        "ecs:DeleteCluster",
        "ecs:RegisterTaskDefinition",
        "ecs:DeregisterTaskDefinition",
        "ecs:RunTask",
        "ecs:StartTask",
        "ecs:StopTask",
        "ecs:UpdateCluster",
        "ecs:UpdateContainerAgent",
        "ecs:DeregisterContainerInstance",
        "logs:CreateLogGroup",
        "logs:CreateLogStream",
        "logs:PutLogEvents",
        "logs:DescribeLogGroups",
        "iam:GetInstanceProfile",
        "iam:GetRole"
      ],
      "Resource": "*"
    },
    {
      "Sid": "AWSBatchPolicyStatement2",
      "Effect": "Allow",
      "Action": "ecs:TagResource",
      "Resource": [
        "arn:aws:ecs:*:*:task/*_Batch_*"
      ]
    },
    {
      "Sid": "AWSBatchPolicyStatement3",
      "Effect": "Allow",
      "Action": "iam:PassRole",
      "Resource": [
        "*"
      ],
      "Condition": {
        "StringEquals": {
          "iam:PassedToService": [
            "ec2.amazonaws.com",
            "ec2.amazonaws.com.cn",
            "ecs-tasks.amazonaws.com"
          ]
        }
      }
    },
    {
      "Sid": "AWSBatchPolicyStatement4",
      "Effect": "Allow",
      "Action": "iam:CreateServiceLinkedRole",
      "Resource": "*",
      "Condition": {
        "StringEquals": {
          "iam:AWSServiceName": [
            "spot.amazonaws.com",
            "spotfleet.amazonaws.com",
            "autoscaling.amazonaws.com",
            "ecs.amazonaws.com"
          ]
        }
      }
    },
    {
      "Sid": "AWSBatchPolicyStatement5",
      "Effect": "Allow",
      "Action": [
        "ec2:CreateTags"
      ],
      "Resource": [
        "*"
      ],
      "Condition": {
        "StringEquals": {
          "ec2:CreateAction": "RunInstances"
        }
      }
    }
  ]
}

Version history

Current version v14, edited by AWS on 2026-08-25. 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/AWSBatchServiceRole
aws iam attach-user-policy --user-name USER_NAME --policy-arn arn:aws:iam::aws:policy/service-role/AWSBatchServiceRole
aws iam attach-group-policy --group-name GROUP_NAME --policy-arn arn:aws:iam::aws:policy/service-role/AWSBatchServiceRole

CloudFormation

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

Terraform

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

CDK (TypeScript)

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

Sources

Pending editorial review. No editorial sources are listed yet.