AWS弹性Beanstalk创建环境时出现错误。”没有实例。无法假定角色XXXXX。”

huangapple go评论58阅读模式
英文:

AWS Elastic Beanstalk Error when creating environment. "There are no instances. Unable to assume role XXXXX."

问题

我正在尝试理解如何使用AWS Beanstalk。但我正在努力找出创建服务角色和实例配置文件时使其正常工作所需的适当策略。这是一个Ruby应用程序。

这是我在创建环境时遇到的错误。之前我遇到了关于托管更新的另一个错误,在添加了正确的策略后已解决。

> 环境健康状态已从挂起转变为警告。
> 初始化正在进行中(已运行2分钟)。没有
> 实例。无法承担角色
> “arn:aws:iam::149413950731:role/elasticbeanstalk-admin-role-services”。
> 请验证角色是否存在并正确配置。

我尝试在更新角色后重新构建环境,仍然遇到相同的问题。

我正在使用具有PoweruserAccess权限的用户。

以下是角色列表:
AWS弹性Beanstalk创建环境时出现错误。”没有实例。无法假定角色XXXXX。”

这是所选的服务角色策略:
AWS弹性Beanstalk创建环境时出现错误。”没有实例。无法假定角色XXXXX。”

以及实例配置文件:
AWS弹性Beanstalk创建环境时出现错误。”没有实例。无法假定角色XXXXX。”

英文:

I'm trying to understand how to use AWS Beanstalk. But I'm struggling to find out the proper policies to make it work when creating Service Roles and Instance Profiles. It's a ruby application.

This is my error when creating an environment. Before I had another error about Managed Updates, which was solved after adding the right policy.

> Environment health has transitioned from Pending to Warning.
> Initialization in progress (running for 2 minutes). There are no
> instances. Unable to assume role
> "arn:aws:iam::149413950731:role/elasticbeanstalk-admin-role-services".
> Verify that the role exists and is configured correctly.

I tried rebuild the environment after updating the roles, still having the same problem.

I'm using a user with PoweruserAccess.

This is the list of roles:
AWS弹性Beanstalk创建环境时出现错误。”没有实例。无法假定角色XXXXX。”

Here are the Service Role policies selected:
AWS弹性Beanstalk创建环境时出现错误。”没有实例。无法假定角色XXXXX。”

And the Instance Profile:
AWS弹性Beanstalk创建环境时出现错误。”没有实例。无法假定角色XXXXX。”

答案1

得分: 2

为了解决这个问题,我进入了 IAM 角色,在进入与错误消息相关的特定角色后,我编辑了受信实体内部的主体。

将“Principal: Service:”更改为 elasticbeanstalk.amazonaws.com

之前是 ec2.amazonaws.com

感谢 @luk2302 给出的提示。

AWS弹性Beanstalk创建环境时出现错误。”没有实例。无法假定角色XXXXX。”

英文:

To solve this, I went to IAM Roles, after entering the specific role related to the error message, I edited the principal inside the Trusted Entity.

Changed the "Principal: Service:" to elasticbeanstalk.amazonaws.com

Before was ec2.amazonaws.com

AWS弹性Beanstalk创建环境时出现错误。”没有实例。无法假定角色XXXXX。”

Thanks to @luk2302 for giving the tip.

huangapple
  • 本文由 发表于 2023年7月13日 18:54:27
  • 转载请务必保留本文链接:https://go.coder-hub.com/76678574.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定