Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS: Beanstalk ERROR: Operation Denied. Are your permissions correct? with EB CLI

Trying AWS hosting for the first time. Am using python3.4 eb CLI. Am always getting same Error output for eb init. On simulator for the same user all actions are allowed. Where am I going wrong? Why do I always get ERROR: Operation Denied. Are your permissions correct?

Used pip to install eb cli. Any pointers will be helpful.

like image 996
Supritha P Avatar asked Jan 21 '15 16:01

Supritha P


People also ask

What is EB command?

The EB CLI is a command line interface for AWS Elastic Beanstalk that provides interactive commands that simplify creating, updating and monitoring environments from a local repository. Use the EB CLI as part of your everyday development and testing cycle as an alternative to the Elastic Beanstalk console.

How do you setup EB CLI with EB ENV that is already running?

To attach the EB CLI to an existing environmentOpen a command line terminal and navigate to your user folder. Create and open a new folder for your environment. Run the eb init command, and then choose the application and environment whose health you want to monitor.


1 Answers

This looks like the credentials you are using have limited permissions.

When you first setup the EB CLI, or run aws configure, you will be prompted for your AWS Access Key ID and AWS Secret Access Key. These are the credential keys for a specific root account or IAM User. It is best practice to use an IAM User for most access.

If you have already setup your credentials for the CLI you can check them either in the ~/.aws/config or ~/.aws/credentials file.

An example of a ~/.aws/credentials would be like so:

[default]
aws_access_key_id = AKIAIOSFODNN7EXAMPLE
aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

[limited]
aws_access_key_id = AKIAIOSFODNN7EXAMPLE
aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

By default the credentials under the [default] option will be used if no profile is specified in the command line. If you wish to use a specific profile of credentials you can specify them like this: eb init --profile limited.

You can search for the credentials being used via the IAM console, from there you can view which permissions have been granted to your user. You can also add permissions for that user in this console.

like image 199
nbalas Avatar answered Dec 23 '22 20:12

nbalas