Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Beanstalk - getting "Access denied while accessing Auto Scaling and ..." error

When I try to launch an Elastic Beanstalk environment from the command line, I get this error during the process:

Environment health has transitioned from Pending to Warning. Access denied while accessing Auto Scaling and Elastic Load Balancing using role "arn:aws:iam::XXXXXXXXXX:role/aws-elasticbeanstalk-service-role". Verify the role policy.

When I launch it from the console, I do not get this warning. I have tried to replicate the same AWS console configuration from the CLI , but I still get this error.

Any clue what's going on?

like image 882
Bill_Flanders Avatar asked Jan 27 '16 21:01

Bill_Flanders


People also ask

Does Elastic Beanstalk auto scale?

Your AWS Elastic Beanstalk environment includes an Auto Scaling group that manages the Amazon EC2 instances in your environment. In a single-instance environment, the Auto Scaling group ensures that there is always one instance running.

Which service can be used to restrict access to AWS Elastic Beanstalk resources?

Short description. You can restrict the permissions of an IAM user or role by using an IAM policy. The policy can restrict access to a single environment or application.

What workloads can you deploy using Elastic Beanstalk?

AWS Elastic Beanstalk is an easy-to-use service for deploying and scaling web applications and services developed with Java, . NET, PHP, Node. js, Python, Ruby, Go, and Docker on familiar servers such as Apache, Nginx, Passenger, and IIS.


2 Answers

If anyone is still getting a similar error and is still unsure how to solve it

  1. Navigate to IAM in the AWS Console.
  2. Navigate to the aws-elasticbeanstalk-service-role (under Access Management > Roles).
  3. Attach the following policies:
    • AutoScalingFullAccess
    • ElasticLoadBalancingFullAccess

I then rebuilt the environment, no more errors!

The following article helped me understand this better: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts-roles-service.html

like image 192
Eric Geerts Avatar answered Sep 21 '22 05:09

Eric Geerts


You can go to your IAM console. You will see the "aws-elasticbeanstalk-service-role", Under the permission tab, you can grant the specific you want to give the policy on your behalf. Refresh and you should have "Ok". Make sure the permission you grant the role can manage this " Auto Scaling and Elastic Load Balancing using role"

like image 36
Aransiola Oluwaseun Avatar answered Sep 22 '22 05:09

Aransiola Oluwaseun