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

相关推荐
小白考证进阶中9 小时前
阿里云认证重要通知(Clouder+ACX职业岗位)
阿里云·云计算·阿里云acp报名·阿里云acp备考·阿里云aca证书·阿里云aca大模型·阿里云aca报名
spider_xcxc11 小时前
告别单点故障:阿里云CLB负载均衡从入门到实战
阿里云·云计算·负载均衡
hz5678914 小时前
电子远程评标系统哪家好?安全、合规、易用平台评测指南
安全·云计算·音视频·实时音视频·信息与通信
翼龙云_cloud16 小时前
腾讯云代理商: 腾讯云qGPU怎么破解算力浪费难题?
云计算·腾讯云·qgpu
阿乔外贸日记21 小时前
意大利进口主力产品及主要合作供应国
大数据·人工智能·物联网·搜索引擎·云计算
云服务器代理商21 小时前
AWS Bedrock 指南:模型接入、Knowledge Base RAG、Agents 与计费方式
云计算·aws·亚马逊云服务器·aws bedrock·aws代理·亚马逊云代理商
spider_xcxc21 小时前
阿里云NAS配置完全指南:从概念到实战
阿里云·云计算
我登哥MVP1 天前
Hadoop成长史-从Nutch子项目到大数据生态王者
java·大数据·hadoop·分布式·云原生·云计算
我登哥MVP1 天前
HDFS硬核拆解-读写Pipeline与Java实战
java·hadoop·hdfs·云原生·云计算
Database_Cool_1 天前
HTAP数据库详解_阿里云PolarDB-X一体化行列存实现实时分析
分布式·阿里云·云计算