选择您的 Cookie 首选项

我们使用必要 Cookie 和类似工具提供我们的网站和服务。我们使用性能 Cookie 收集匿名统计数据,以便我们可以了解客户如何使用我们的网站并进行改进。必要 Cookie 无法停用,但您可以单击“自定义”或“拒绝”来拒绝性能 Cookie。

如果您同意,AWS 和经批准的第三方还将使用 Cookie 提供有用的网站功能、记住您的首选项并显示相关内容,包括相关广告。要接受或拒绝所有非必要 Cookie,请单击“接受”或“拒绝”。要做出更详细的选择,请单击“自定义”。

BatchServiceRolePolicy - AWS 托管策略

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

BatchServiceRolePolicy

描述:为 AWS Batch 服务提供管理所需资源的访问权限,包括 Amazon EC2 和 Amazon ECS 资源。

BatchServiceRolePolicy 是一项 AWS 托管式策略

使用此策略

此附加到服务相关角色的策略允许服务代表您执行操作。您无法将此策略附加到您的用户、组或角色。

策略详细信息

  • 类型:服务相关角色策略

  • 创建时间:2021 年 3 月 10 日 06:55 UTC

  • 编辑时间:2023 年 12 月 5 日 22:52 UTC

  • ARN: arn:aws:iam::aws:policy/aws-service-role/BatchServiceRolePolicy

策略版本

策略版本:v7(默认)

此策略的默认版本是定义策略权限的版本。当使用该策略的用户或角色请求访问 AWS 资源时,AWS 会检查策略的默认版本以确定是否允许该请求。

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:RequestSpotFleet", "autoscaling:DescribeAccountLimits", "autoscaling:DescribeAutoScalingGroups", "autoscaling:DescribeLaunchConfigurations", "autoscaling:DescribeAutoScalingInstances", "autoscaling:DescribeScalingActivities", "eks:DescribeCluster", "ecs:DescribeClusters", "ecs:DescribeContainerInstances", "ecs:DescribeTaskDefinition", "ecs:DescribeTasks", "ecs:ListClusters", "ecs:ListContainerInstances", "ecs:ListTaskDefinitionFamilies", "ecs:ListTaskDefinitions", "ecs:ListTasks", "ecs:DeregisterTaskDefinition", "ecs:TagResource", "ecs:ListAccountSettings", "logs:DescribeLogGroups", "iam:GetInstanceProfile", "iam:GetRole" ], "Resource" : "*" }, { "Sid" : "AWSBatchPolicyStatement2", "Effect" : "Allow", "Action" : [ "logs:CreateLogGroup", "logs:CreateLogStream" ], "Resource" : "arn:aws:logs:*:*:log-group:/aws/batch/job*" }, { "Sid" : "AWSBatchPolicyStatement3", "Effect" : "Allow", "Action" : [ "logs:PutLogEvents" ], "Resource" : "arn:aws:logs:*:*:log-group:/aws/batch/job*:log-stream:*" }, { "Sid" : "AWSBatchPolicyStatement4", "Effect" : "Allow", "Action" : [ "autoscaling:CreateOrUpdateTags" ], "Resource" : "*", "Condition" : { "Null" : { "aws:RequestTag/AWSBatchServiceTag" : "false" } } }, { "Sid" : "AWSBatchPolicyStatement5", "Effect" : "Allow", "Action" : "iam:PassRole", "Resource" : [ "*" ], "Condition" : { "StringEquals" : { "iam:PassedToService" : [ "ec2.amazonaws.com", "ec2.amazonaws.com.cn", "ecs-tasks.amazonaws.com" ] } } }, { "Sid" : "AWSBatchPolicyStatement6", "Effect" : "Allow", "Action" : "iam:CreateServiceLinkedRole", "Resource" : "*", "Condition" : { "StringEquals" : { "iam:AWSServiceName" : [ "spot.amazonaws.com", "spotfleet.amazonaws.com", "autoscaling.amazonaws.com", "ecs.amazonaws.com" ] } } }, { "Sid" : "AWSBatchPolicyStatement7", "Effect" : "Allow", "Action" : [ "ec2:CreateLaunchTemplate" ], "Resource" : "*", "Condition" : { "Null" : { "aws:RequestTag/AWSBatchServiceTag" : "false" } } }, { "Sid" : "AWSBatchPolicyStatement8", "Effect" : "Allow", "Action" : [ "ec2:TerminateInstances", "ec2:CancelSpotFleetRequests", "ec2:ModifySpotFleetRequest", "ec2:DeleteLaunchTemplate" ], "Resource" : "*", "Condition" : { "Null" : { "aws:ResourceTag/AWSBatchServiceTag" : "false" } } }, { "Sid" : "AWSBatchPolicyStatement9", "Effect" : "Allow", "Action" : [ "autoscaling:CreateLaunchConfiguration", "autoscaling:DeleteLaunchConfiguration" ], "Resource" : "arn:aws:autoscaling:*:*:launchConfiguration:*:launchConfigurationName/AWSBatch*" }, { "Sid" : "AWSBatchPolicyStatement10", "Effect" : "Allow", "Action" : [ "autoscaling:CreateAutoScalingGroup", "autoscaling:UpdateAutoScalingGroup", "autoscaling:SetDesiredCapacity", "autoscaling:DeleteAutoScalingGroup", "autoscaling:SuspendProcesses", "autoscaling:PutNotificationConfiguration", "autoscaling:TerminateInstanceInAutoScalingGroup" ], "Resource" : "arn:aws:autoscaling:*:*:autoScalingGroup:*:autoScalingGroupName/AWSBatch*" }, { "Sid" : "AWSBatchPolicyStatement11", "Effect" : "Allow", "Action" : [ "ecs:DeleteCluster", "ecs:DeregisterContainerInstance", "ecs:RunTask", "ecs:StartTask", "ecs:StopTask" ], "Resource" : "arn:aws:ecs:*:*:cluster/AWSBatch*" }, { "Sid" : "AWSBatchPolicyStatement12", "Effect" : "Allow", "Action" : [ "ecs:RunTask", "ecs:StartTask", "ecs:StopTask" ], "Resource" : "arn:aws:ecs:*:*:task-definition/*" }, { "Sid" : "AWSBatchPolicyStatement13", "Effect" : "Allow", "Action" : [ "ecs:StopTask" ], "Resource" : "arn:aws:ecs:*:*:task/*/*" }, { "Sid" : "AWSBatchPolicyStatement14", "Effect" : "Allow", "Action" : [ "ecs:CreateCluster", "ecs:RegisterTaskDefinition" ], "Resource" : "*", "Condition" : { "Null" : { "aws:RequestTag/AWSBatchServiceTag" : "false" } } }, { "Sid" : "AWSBatchPolicyStatement15", "Effect" : "Allow", "Action" : "ec2:RunInstances", "Resource" : [ "arn:aws:ec2:*::image/*", "arn:aws:ec2:*::snapshot/*", "arn:aws:ec2:*:*:subnet/*", "arn:aws:ec2:*:*:network-interface/*", "arn:aws:ec2:*:*:security-group/*", "arn:aws:ec2:*:*:volume/*", "arn:aws:ec2:*:*:key-pair/*", "arn:aws:ec2:*:*:launch-template/*", "arn:aws:ec2:*:*:placement-group/*", "arn:aws:ec2:*:*:capacity-reservation/*", "arn:aws:ec2:*:*:elastic-gpu/*", "arn:aws:elastic-inference:*:*:elastic-inference-accelerator/*", "arn:aws:resource-groups:*:*:group/*" ] }, { "Sid" : "AWSBatchPolicyStatement16", "Effect" : "Allow", "Action" : "ec2:RunInstances", "Resource" : "arn:aws:ec2:*:*:instance/*", "Condition" : { "Null" : { "aws:RequestTag/AWSBatchServiceTag" : "false" } } }, { "Sid" : "AWSBatchPolicyStatement17", "Effect" : "Allow", "Action" : [ "ec2:CreateTags" ], "Resource" : [ "*" ], "Condition" : { "StringEquals" : { "ec2:CreateAction" : [ "RunInstances", "CreateLaunchTemplate", "RequestSpotFleet" ] } } } ] }

了解更多信息

隐私网站条款Cookie 首选项
© 2025, Amazon Web Services, Inc. 或其附属公司。保留所有权利。