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中有以下内容:

{
   
  "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

相关推荐

  1. AWS使用ECSecsTaskExecutionRole缺失

    2023-12-05 15:54:10       41 阅读
  2. AWS EKS使用Socket.IO

    2023-12-05 15:54:10       16 阅读
  3. AWS EC2使用 instance profile 访问S3

    2023-12-05 15:54:10       45 阅读
  4. Jenkins构建Spring服务并推送到AWS ECR+AWS EKS

    2023-12-05 15:54:10       11 阅读

最近更新

  1. TCP协议是安全的吗?

    2023-12-05 15:54:10       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2023-12-05 15:54:10       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2023-12-05 15:54:10       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2023-12-05 15:54:10       20 阅读

热门阅读

  1. 2-- 简要介绍 Kubernetes

    2023-12-05 15:54:10       36 阅读
  2. MiniDumpWriteDump函数生成dmp文件

    2023-12-05 15:54:10       44 阅读
  3. Xshell远程登录AWS EC2 Linux实例

    2023-12-05 15:54:10       48 阅读
  4. Github项目-CNNResnet9-残差神经网络水果多分类项目

    2023-12-05 15:54:10       39 阅读
  5. sklearn教程:titanic泰坦尼克号数据集

    2023-12-05 15:54:10       34 阅读
  6. 快速学习PyQt5的高级自定义控件

    2023-12-05 15:54:10       34 阅读
  7. 达梦8搭建DataWatch集群

    2023-12-05 15:54:10       25 阅读
  8. MySQL 学习笔记(刷题篇)

    2023-12-05 15:54:10       36 阅读