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

相关推荐
Benszen20 小时前
云计算基础-13:Linux网络管理实战-1
linux·运维·云计算
聚搜云——JuSouClouD1 天前
广州阿里云代理商:多 Agent 协同异常 三大核心问题解析
网络·阿里云·云计算
酷可达拉斯2 天前
Linux操作系统-升级OpenSSH修复漏洞
linux·运维·服务器·云计算
AAA@峥2 天前
K8s 配置管理实战:ConfigMap 与 Secret 完整使用指南
kubernetes·云计算
zero_70322 天前
第二次作业 实验
网络协议·云计算·ensp
聚搜云——JuSouClouD3 天前
深圳阿里云代理商:OpenTelemetry 统一观测日志指标链路接入实战
阿里云·云计算
workflower3 天前
全球云计算产业发展态势-市场:云计算规模保持稳步增长,产业格局日趋明晰
人工智能·深度学习·机器学习·设计模式·机器人·云计算
皮皮虾❀4 天前
阿里巴巴“千问办公”公测深度解析:企业级Agent如何重塑智能办公
人工智能·阿里云·云计算
翼龙云_cloud4 天前
阿里云国际代理商:Redis缓存实例配置和性能优化 从参数调优到持久化
运维·redis·阿里云·缓存·云计算
聚搜云——JuSouClouD4 天前
深圳阿里云代理商:K8s Pod OOM智能排查修复指南
阿里云·kubernetes·云计算