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

相关推荐
A小辣椒14 小时前
AWS Clould Support Engineer就职面试题
aws
tiancaijiben3 天前
阿里云Kubernetes集群托管完全指南:从创建到生产级运维
云计算
亚林瓜子3 天前
AWS WAF中如何放行某个触发了托管规则的接口
aws·waf
互联网推荐官3 天前
上海软件定制开发公司推荐:从PaaS工程化路径看D-coding的技术取舍
云原生·云计算·paas·软件开发·开发经验·上海
sbjdhjd3 天前
从零搭建企业级 CI/CD(下):Jenkins+GitLab+Harbor 全链路实战指南
git·servlet·ci/cd·云原生·云计算·gitlab·jenkins
tiancaijiben3 天前
阿里云应用实时监控服务ARMS完全接入指南:从探针部署到全链路可观测
云计算
xingyuzhisuan3 天前
算力租赁平台 GPU 资源隔离方案:显存抢占问题深度排查与解决
大数据·云计算·gpu算力
workbuddy小能手4 天前
腾讯云ADP Agent Portal vs 自建智能体:架构选型对比
架构·云计算·腾讯云
宸津-代码粉碎机4 天前
Spring AI 企业级实战|智能记忆摘要+自动遗忘机制落地,彻底解决上下文爆炸与Token冗余
java·大数据·人工智能·后端·python·spring·云计算