amazon-web-servicesamazon-elastic-beanstalkamazon-iamaws-roles

eb create can't see Unable to assign role, needs to verify that you have permission to pass this role: aws-elasticbeanstalk-service-role


I have a node app want to upload it on EB. after running eb init and create the application, tried to eb create I got this

WARNING: Insufficient IAM privileges. Unable to determine if instance profile 'aws-elasticbeanstalk-ec2-role' exists, assuming that it exists.
Creating application version archive "app-230218_020058149734".
Uploading testEBUdg/app-230218_020058149734.zip to S3. This may take a while.
Upload Complete.
Environment details for: testEBUdg-dev
  Application name: testEBUdg
  Region: us-east-1
  Deployed Version: app-230218_020058149734
  Environment ID: e-spw6eyzmpe
  Platform: arn:aws:elasticbeanstalk:us-east-1::platform/Node.js 14 running on 64bit Amazon Linux 2/5.6.4
  Tier: WebServer-Standard-1.0
  CNAME: testEBUdg-dev.us-east-1.elasticbeanstalk.com
  Updated: 2023-02-18 00:01:36.993000+00:00
Printing Status:
2023-02-18 00:01:35    INFO    createEnvironment is starting.
2023-02-18 00:01:37    INFO    Using elasticbeanstalk-us-east-1-xxxxxxxxxx as Amazon S3 storage bucket for environment data.
2023-02-18 00:01:38    ERROR   Unable to assign role. Please verify that you have permission to pass this role: aws-elasticbeanstalk-service-role.
2023-02-18 00:01:38    ERROR   Failed to launch environment.
ERROR: ServiceError - Failed to launch environment.

Permissions policies


Solution

  • It looks like the aws credentials were not configured, so you need to set them up using aws configure and the user need to have the appropriate permission and then perform eb init.