Home > OS >  ERROR: NotAuthorizedError - Operation Denied on AWS eb init
ERROR: NotAuthorizedError - Operation Denied on AWS eb init

Time:09-21

I try to initialize an elastic beanstalk application with eb cli using command eb init. After several steps it asks for some input to create a public key. However, when I enter input it gives "ERROR: NotAuthorizedError - Operation Denied. You are not authorized to perform this operation. Encoded authorization failure message: " error. My IAM user roles are listed here :

 AWSCodeCommitFullAccess
 AmazonEC2ContainerRegistryFullAccess
 AWSElasticBeanstalkMulticontainerDocker
 AmazonECS_FullAccess
 AmazonECSTaskExecutionRolePolicy
 AmazonEC2ContainerServiceforEC2Role
 AmazonEC2ContainerServiceRole
 AdministratorAccess-AWSElasticBeanstalk
 AWSElasticBeanstalkReadOnly

Do I need an additional permission to be able to intialize a beanstalk application?

CodePudding user response:

It fails to create an ssh public key for your instance during the eb init. You need a IAM policy that has ec2:CreateKeyPair permission.

CodePudding user response:

You need to add AmazonEC2FullAccess permission to the default iam user on your local machine. access aws console

  1. search iam.
  2. select the iam user, which is your default user.
  3. click on button with attach existing permission.
  4. click on add permission and search for AmazonEC2FullAccess then add it
  • Related