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

相关推荐
池央5 分钟前
AI性能极致体验:通过阿里云平台高效调用满血版DeepSeek-R1模型
人工智能·阿里云·云计算
weixin_307779131 小时前
Azure上基于OpenAI GPT-4模型验证行政区域数据的设计方案
数据仓库·python·云计算·aws
weixin_3077791310 小时前
AWS上Amazon Redshift用Zoominfo API验证公司基本信息数据正确性检查设计方案
数据仓库·python·云计算·aws
软件技术NINI12 小时前
阿里云百炼初探DeepSeek模型调用
阿里云·云计算
KubeSphere 云原生14 小时前
云原生周刊:KubeEdge 1.20.0版本正式发布
云计算·k8s·容器平台·kubesphere
AWS官方合作商15 小时前
泛娱乐行业技术突围:AWS云服务如何重塑数字娱乐新生态?
架构·云计算·aws
天翼云开发者社区16 小时前
解锁DeepSeek深度应用,天翼云GPU云主机强势破局!
云计算·gpu算力·ai应用·deepseek
拍客圈19 小时前
阿里云大文件ossutil工具进行上传下载,该工具支持断点续传
阿里云·云计算
Anna_Tong19 小时前
如何通过阿里云内容安全在数字时代获得“第一防线”?
安全·网络安全·阿里云·云计算·智能家居·内容安全·实时监控
凯子坚持 c19 小时前
企业级API集成方案:基于阿里云函数计算调用DeepSeek全解析
阿里云·云计算