4

I was following the tutorial here for a Ruby on Rails app to deploy to AWS using Elastic Beanstalk. I am getting the error

Unable to assume role "arn:aws:iam::xxxxxxxxxx:role/aws-elasticbeanstalk-service-role". 
Verify that the role exists and is configured correctly.

So I created a Role in IAM, and gave the AWSElasticBeanstalkFullAccess policy so far. I am wondering what I missed.

Also, when I do eb open, it gives me a 502 Bad Gateway Error. Is this related to the above error?

user2857014
  • 507
  • 3
  • 10
  • 22

1 Answers1

2

You need to give the right permissions to the role. Service role gives elasticbeanstalk the permission to call other services on your behalf.

You can read about the permissions required for your role here. Also do not mix service role and instance profile. They are two different roles with different purposes. Please read my answer for a more detailed explanation here.

Community
  • 1
  • 1
Rohit Banga
  • 18,458
  • 31
  • 113
  • 191
  • 3
    "You need to give the right permissions to the role." you don't say why don't you explain exactly what roles to assign and why instead of linking documentation? Your answer is not only useless but also a waste of time for people who are starting with AWS. – Michal Jun 03 '23 at 18:23