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

相关推荐
@insist1237 小时前
信息安全工程师-云计算安全核心知识框架
安全·云计算·软考·信息安全工程师·软件水平考试
ZStack开发者社区11 小时前
全球化2.0 | ZStack亮相印尼云计算与数据中心大会 以新一代云底座助力数字印尼建设
服务器·云计算·gpu算力
SAP上海工博云署12 小时前
汽配出海业务扩张难题拆解:SAP Business One 适配跨境制造管理
大数据·人工智能·云计算·制造·信息与通信·零售
XINVRY-FPGA13 小时前
XC7Z020-2CLG484I Xilinx Zynq-7000 SoC FPGA
嵌入式硬件·fpga开发·云计算·硬件工程·fpga
智慧医养结合软件开源14 小时前
数智协同,赋能康养服务高效升级
大数据·人工智能·云计算·生活
林林奇遇记14 小时前
阿里云虚拟主机wordpress无法安装插件
阿里云·云计算
少年攻城狮15 小时前
阿里云系列---【申请域名并绑定到主机ip】
linux·服务器·tcp/ip·阿里云·云计算
酷道15 小时前
获取Docker阿里云专属镜像加速地址
阿里云·docker·容器·云计算
互联网老欣15 小时前
2026 最新|OpenClaw(Clawdbot)阿里云轻量服务器一键部署保姆级教程(避坑 + 性能调优)
服务器·阿里云·云计算
Harvy_没救了15 小时前
【云计算】OpenStack 核心组件知识总结(一)
云计算·openstack