AmazonECSServiceRolePolicy - AWS 托管策略

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

AmazonECSServiceRolePolicy

描述:允许 Amazon ECS 管理您的集群的策略。

AmazonECSServiceRolePolicy 是一项 AWS 托管式策略

使用此策略

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

策略详细信息

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

  • 创建时间:2017 年 10 月 14 日 01:18 UTC

  • 编辑时间:世界标准时间 2025 年 6 月 24 日 21:22

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

策略版本

策略版本:v12(默认)

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

JSON 策略文档

{ "Version" : "2012-10-17", "Statement" : [ { "Sid" : "ECSTaskManagement", "Effect" : "Allow", "Action" : [ "ec2:AttachNetworkInterface", "ec2:CreateNetworkInterface", "ec2:CreateNetworkInterfacePermission", "ec2:DeleteNetworkInterface", "ec2:DeleteNetworkInterfacePermission", "ec2:Describe*", "ec2:DetachNetworkInterface", "elasticloadbalancing:DeregisterInstancesFromLoadBalancer", "elasticloadbalancing:DeregisterTargets", "elasticloadbalancing:Describe*", "elasticloadbalancing:RegisterInstancesWithLoadBalancer", "elasticloadbalancing:RegisterTargets", "route53:ChangeResourceRecordSets", "route53:CreateHealthCheck", "route53:DeleteHealthCheck", "route53:Get*", "route53:List*", "route53:UpdateHealthCheck", "servicediscovery:DeregisterInstance", "servicediscovery:Get*", "servicediscovery:List*", "servicediscovery:RegisterInstance", "servicediscovery:UpdateInstanceCustomHealthStatus" ], "Resource" : "*" }, { "Sid" : "AutoScaling", "Effect" : "Allow", "Action" : [ "autoscaling:Describe*" ], "Resource" : "*" }, { "Sid" : "AutoScalingManagement", "Effect" : "Allow", "Action" : [ "autoscaling:DeletePolicy", "autoscaling:PutScalingPolicy", "autoscaling:SetInstanceProtection", "autoscaling:UpdateAutoScalingGroup", "autoscaling:PutLifecycleHook", "autoscaling:DeleteLifecycleHook", "autoscaling:CompleteLifecycleAction", "autoscaling:RecordLifecycleActionHeartbeat" ], "Resource" : "*", "Condition" : { "Null" : { "autoscaling:ResourceTag/AmazonECSManaged" : "false" } } }, { "Sid" : "AutoScalingPlanManagement", "Effect" : "Allow", "Action" : [ "autoscaling-plans:CreateScalingPlan", "autoscaling-plans:DeleteScalingPlan", "autoscaling-plans:DescribeScalingPlans", "autoscaling-plans:DescribeScalingPlanResources" ], "Resource" : "*" }, { "Sid" : "EventBridge", "Effect" : "Allow", "Action" : [ "events:DescribeRule", "events:ListTargetsByRule" ], "Resource" : "arn:aws:events:*:*:rule/ecs-managed-*" }, { "Sid" : "EventBridgeRuleManagement", "Effect" : "Allow", "Action" : [ "events:PutRule", "events:PutTargets" ], "Resource" : "*", "Condition" : { "StringEquals" : { "events:ManagedBy" : "ecs.amazonaws.com" } } }, { "Sid" : "CWAlarmManagement", "Effect" : "Allow", "Action" : [ "cloudwatch:DeleteAlarms", "cloudwatch:DescribeAlarms", "cloudwatch:PutMetricAlarm" ], "Resource" : "arn:aws:cloudwatch:*:*:alarm:*" }, { "Sid" : "ECSTagging", "Effect" : "Allow", "Action" : [ "ec2:CreateTags" ], "Resource" : "arn:aws:ec2:*:*:network-interface/*" }, { "Sid" : "CWLogGroupManagement", "Effect" : "Allow", "Action" : [ "logs:CreateLogGroup", "logs:DescribeLogGroups", "logs:PutRetentionPolicy" ], "Resource" : "arn:aws:logs:*:*:log-group:/aws/ecs/*" }, { "Sid" : "CWLogStreamManagement", "Effect" : "Allow", "Action" : [ "logs:CreateLogStream", "logs:DescribeLogStreams", "logs:PutLogEvents" ], "Resource" : "arn:aws:logs:*:*:log-group:/aws/ecs/*:log-stream:*" }, { "Sid" : "ExecuteCommandSessionManagement", "Effect" : "Allow", "Action" : [ "ssm:DescribeSessions" ], "Resource" : "*" }, { "Sid" : "ExecuteCommand", "Effect" : "Allow", "Action" : [ "ssm:StartSession" ], "Resource" : [ "arn:aws:ecs:*:*:task/*", "arn:aws:ssm:*:*:document/AmazonECS-ExecuteInteractiveCommand" ] }, { "Sid" : "CloudMapResourceCreation", "Effect" : "Allow", "Action" : [ "servicediscovery:CreateHttpNamespace", "servicediscovery:CreateService" ], "Resource" : "*", "Condition" : { "ForAllValues:StringEquals" : { "aws:TagKeys" : [ "AmazonECSManaged" ] } } }, { "Sid" : "CloudMapResourceTagging", "Effect" : "Allow", "Action" : "servicediscovery:TagResource", "Resource" : "*", "Condition" : { "StringLike" : { "aws:RequestTag/AmazonECSManaged" : "*" } } }, { "Sid" : "CloudMapResourceDeletion", "Effect" : "Allow", "Action" : [ "servicediscovery:DeleteService" ], "Resource" : "*", "Condition" : { "Null" : { "aws:ResourceTag/AmazonECSManaged" : "false" } } }, { "Sid" : "CloudMapResourceDiscovery", "Effect" : "Allow", "Action" : [ "servicediscovery:DiscoverInstances", "servicediscovery:DiscoverInstancesRevision" ], "Resource" : "*" }, { "Sid" : "CloudMapResourceAttributeManagement", "Effect" : "Allow", "Action" : [ "servicediscovery:UpdateServiceAttributes" ], "Resource" : "*", "Condition" : { "Null" : { "aws:ResourceTag/AmazonECSManaged" : "false" } } } ] }

了解更多信息