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

相关推荐
m0_694845575 小时前
服务器需要备案吗?在哪些地区需要备案?
linux·运维·服务器·云计算
云资源服务商11 小时前
解锁阿里云日志服务SLS:云时代的日志管理利器
服务器·阿里云·云计算
朱包林12 小时前
day45-nginx复杂跳转与https
linux·运维·服务器·网络·云计算
sealaugh3216 小时前
aws(学习笔记第四十八课) appsync-graphql-dynamodb
笔记·学习·aws
m0_694845571 天前
服务器如何配置防火墙规则开放/关闭端口?
linux·服务器·安全·云计算
moppol1 天前
Serverless 架构入门与实战:AWS Lambda、Azure Functions、Cloudflare Workers 对比
云原生·serverless·aws
观测云1 天前
观测云 × AWS SSO:权限治理可观测实践
云计算·aws
在云上(oncloudai)1 天前
AWS Directory Services全解析
aws
G皮T1 天前
【云计算】企业项目 & 策略授权
云计算·iam·公有云·企业项目·策略授权·统一身份认证
_可乐无糖1 天前
AWS WebRTC: 判断viewer端拉流是否稳定的算法
linux·服务器·webrtc·aws