AWS中使用ECS时ecsTaskExecutionRole缺失

文章目录

问题

在AWS中使用Amazon Elastic Container Service (Amazon ECS) 创建集群,任务,服务和容器时返回ecsTaskExecutionRole的问题,进行解决。

在事件中查看具体报错如下:

===

service Windows-test failed to launch a task with (error ECS was unable to assume the role 'arn:aws:iam::123456789012:role/ecsTaskExecutionRole' that was provided for this task. Please verify that the role being passed has the proper trust relationship and permissions and that your IAM user has permissions to pass this role.).

解决

在AWS IAM中创建ecsTaskExecutionRole这个角色,进行 Add Permissions, Attach policies,将AmazonECSTaskExecutionRolePolicy,添加到ecsTaskExecutionRole,问题解决。

确保Trust relationships中有以下内容:

json 复制代码
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "",
      "Effect": "Allow",
      "Principal": {
        "Service": "ecs-tasks.amazonaws.com"
      },
      "Action": "sts:AssumeRole"
    }
  ]
}

参考

AWS ECS Getting started with the console using Windows containers on AWS Fargate
AWS Amazon ECS task execution IAM role

相关推荐
数据与人工智能律师7 小时前
数字迷雾中的安全锚点:解码匿名化与假名化的法律边界与商业价值
大数据·网络·人工智能·云计算·区块链
在云上(oncloudai)7 小时前
AWS CAF:企业云转型的战略指南
aws
Johny_Zhao19 小时前
Centos8搭建hadoop高可用集群
linux·hadoop·python·网络安全·信息安全·云计算·shell·yum源·系统运维·itsm
_可乐无糖1 天前
AWS WebRTC:我们的业务模式
云计算·音视频·webrtc·aws
Kentos(acoustic ver.)1 天前
云原生 —— K8s 容器编排系统
云原生·容器·kubernetes·云计算·k8s
Britz_Kevin2 天前
从零开始的云计算生活——番外6,使用zabbix对中间件监控
云计算·生活·zabbix
贺贺丿2 天前
Docker2-容器应用工具及docker命令
linux·运维·docker·容器·自动化·云计算
程序猿追2 天前
亚马逊云科技:引领云计算新时代,开启无限可能
科技·云计算·亚马逊
果子⌂2 天前
Kubernetes 服务发布进阶
linux·运维·服务器·云原生·容器·kubernetes·云计算
青梅主码-杰哥2 天前
中央广播电视总台联合阿里云研究院权威发布《中国人工智能应用发展报告(2025)》:我国依旧需要大力注重人工智能人才的培养
人工智能·阿里云·云计算