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

相关推荐
AKAMAI1 小时前
云成本困境:开支激增正阻碍欧洲AI创新
人工智能·云原生·云计算
@HNUSTer1 小时前
基于 GEE 的 Sentinel-2 光谱、指数、纹理特征提取与 Sentinel-1 SAR 数据处理
云计算·sentinel·数据集·遥感大数据·gee·云平台·sar
字节跳动视频云技术团队5 小时前
多媒体实验室画质理解大模型Q-Insight入选NeurIPS 2025 Spotlight
云计算·视频编码
坐吃山猪7 小时前
阿里云智能集团首席技术官云栖大会要点总结
阿里云·云计算
容器魔方7 小时前
Volcano v1.13 重磅发布!大模型训练与推理等调度能力全面增强
云原生·容器·云计算
福大大架构师每日一题10 小时前
nginx 1.29.2 发布:AWS-LC 支持、QUIC及SSL优化等重要更新
nginx·ssl·aws
qq_3391911412 小时前
aws ec服务器设置密码登录,ec服务器root登录 aws服务器初始化配置
服务器·github·aws
费益洲12 小时前
Docker 网络详解:(三)四大网络模式
docker·云计算
王道长AWS_服务器12 小时前
AWS Route 53:DNS 不止能解析,还能做全球流量调度
后端·aws
九河云13 小时前
传统数据安全措施与云计算数据安全的区别
运维·服务器·数据库·云计算