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

相关推荐
容器魔方3 小时前
议程一览 | 华为云亮相 KubeCon + CloudNativeCon China 2026
人工智能·云原生·容器·开源·华为云·云计算
2601_962298675 小时前
AWS推ADOP:用AI Agent把数据工程从周压缩到小时
ai·自动化·agent·aws·数据工程
闲云野鹤在人间5 小时前
云计算入门|网络与存储云服务知识梳理
linux·运维·服务器·网络·centos·云计算·php
论文复现现场16 小时前
ComfyUI部署MiniMax H3:8G本地卡、RTX 4090和RTX 5090怎么选?
人工智能·云计算·音视频·gpu算力
Johny_Zhao17 小时前
网络安全等级保护测评实施方案
linux·网络·人工智能·网络安全·信息安全·云计算·等保测评·系统运维·itsm
腾讯云大数据1 天前
腾讯云AI Native数据平台功能发布合集【8月】
大数据·人工智能·云计算·腾讯云
ZStack开发者社区1 天前
虚拟化观察 第 001 期:ZSvirt 核心 IaaS 引擎开源,VMware Explore 2026 开幕,Proxmox VE 8 正式 EOL
架构·开源·云计算·vmware·云基础设施·proxmox
陈皮糖..1 天前
基于 Keepalived 的传统 Web 高可用架构的容器化改造与可观测性升级
运维·docker·性能优化·架构·云计算·prometheus
爱吃鱼的喵️1 天前
云数据库怎么选?主流云厂商横向对比与选型指南
数据库·阿里云·云计算
Lucifer三思而后行1 天前
转换率 90%,然后呢?
ai·aws