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

相关推荐
Johny_Zhao1 小时前
华为MAAS、阿里云PAI、亚马逊AWS SageMaker、微软Azure ML各大模型深度分析对比
linux·人工智能·ai·信息安全·云计算·系统运维
success_a5 小时前
大故障:阿里云核心域名爆炸了
数据库·阿里云·云计算
AWS官方合作商13 小时前
基于AWS Serverless架构:零运维构建自动化SEO内容生成系统
运维·serverless·aws
家庭云计算专家1 天前
ONLYOFFICE协作空间3.1.1 企业版 介绍及部署说明:家庭云计算专家
运维·服务器·云计算·onlyoffice·协作空间
avoidaily1 天前
使用Node.js分片上传大文件到阿里云OSS
阿里云·node.js·云计算
Elastic 中国社区官方博客2 天前
Elastic 获得 AWS 教育 ISV 合作伙伴资质,进一步增强教育解决方案产品组合
大数据·人工智能·elasticsearch·搜索引擎·云计算·全文检索·aws
agenIT2 天前
腾讯云 Python3.12.8 通过yum安装 并设置为默认版本
云计算·腾讯云
Johny_Zhao2 天前
阿里云数据库Inventory Hint技术分析
linux·mysql·信息安全·云计算·系统运维
容器魔方2 天前
议程一览 | KubeCon China 2025 华为云精彩前瞻
云原生·容器·云计算
FBI HackerHarry浩2 天前
云计算 Linux Rocky day05【rpm、yum、history、date、du、zip、ln】
linux·运维·云计算·腾讯云