AWS eb create-无法找到角色

Sil*_*l05 5 ruby-on-rails amazon-ec2 amazon-web-services amazon-elastic-beanstalk

我有RoR应用程序,并且在使用AWS eb命令行时尝试创建ElasticBeanstalk应用程序,它要求我提供--service-role标志

我给他存在的IAM角色:例如具有管理员权限的admin或aws-elasticbeanstalk-ec2-role

所以我写 eb create --service-role aws-elasticbeanstalk-ec2-role

它开始部署,但是过了一段时间,由于以下原因,它将运行状况转换为警告: Unable to assume role "arn:aws:iam::xxxxxxxxxx:role/aws-elasticbeanstalk-ec2-role". Verify that the role exists and is configured correctly.

这就是为什么我的部署失败。

有什么建议么?

谢谢

Gus*_*taf 0

创建环境时,您可以为其分配服务角色。您需要先创建该角色。您可以使用预定义的。通过控制台,您可以在创建环境时创建此角色。

这些资源应该对您有帮助: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-service.html https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts-roles .html

  • 在我的例子中,该角色存在,但 AWS 在部署时发出了相同的警告,因为该角色缺少必要的信任关系。[基于文档](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts-roles.html#concepts-roles-service)我必须更新现有角色才能使警告消失。 (2认同)