Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS eb create - unable to find role

I have RoR application, and when using AWS eb command line I try to create ElasticBeanstalk application, it asks me for --service-role flag

I give him IAM role that exists: for example admin with admin permissions or aws-elasticbeanstalk-ec2-role

so I write eb create --service-role aws-elasticbeanstalk-ec2-role

It starts to deploy, but after a while it transition health to warning because of: Unable to assume role "arn:aws:iam::xxxxxxxxxx:role/aws-elasticbeanstalk-ec2-role". Verify that the role exists and is configured correctly.

Thats why my deployment fails.

Any suggestions?

Thanks

like image 307
Silverfall05 Avatar asked Nov 09 '22 03:11

Silverfall05


1 Answers

When you create an environment you assign a service role to it. You need to create this role first. There are predefined ones you can use. Through the console you can create this role as you create your environment.

These resources should help you: 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

like image 160
Gustaf Avatar answered Nov 14 '22 23:11

Gustaf