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 小时前
VMware workstation 部署微软MDT系统
网络·人工智能·信息安全·微软·云计算·系统运维·mdt
AWS官方合作商3 小时前
高可用消息队列实战:AWS SQS 在分布式系统中的核心解决方案
云计算·aws·云服务器
算命吗?你算什么东西18 小时前
腾讯云-人脸核身+人脸识别教程
服务器·云计算·腾讯云·环境搭建·人脸·人脸核身
杰克逊的日记20 小时前
阿里云的网络有哪些
网络·阿里云·云计算
萌狼蓝天20 小时前
[SSL]1Panel添加阿里云DNS账户
网络·网络协议·阿里云·云计算·ssl
Johny_Zhao1 天前
CentOS Stream 10安装部署Zabbix 7.0网络监控平台和设备配置添加
linux·网络·网络安全·docker·信息安全·云计算·apache·zabbix·devops·yum源·huawei·系统运维·itsm·华三
cdut_suye1 天前
【Linux系统】从 C 语言文件操作到系统调用的核心原理
java·linux·数据结构·c++·人工智能·机器学习·云计算
不会代码的小徐2 天前
容器安全-核心概述
安全·网络安全·云计算
Lw老王要学习2 天前
Linux数据库篇、第一章_02_MySQL的使用增删改查
linux·运维·数据库·mysql·云计算·it
选型宝2 天前
腾讯怎样基于DeepSeek搭建企业应用?怎样私有化部署满血版DS?直播:腾讯云X DeepSeek!
人工智能·ai·云计算·腾讯云·选型宝