Elastic Beanstalk CLI security token issues

I'm running the EBLCI on Ubuntu. It's pretty slick most of the time but I keep getting kicked out for some kind of security issues. I keep getting the following error:

ERROR: NotAuthorizedError - Operation Denied. The security token included in the request is invalid.

I was able to fix it last week by creating a new IAM key pair and manually inputting the keys into the aws config file in ~.aws/credentials.

This time that didn't work. Any ideas?

1 answer

  • answered 2018-01-11 20:57 Krishna Kumar R

    Check the ~/.aws/credentials file again. When you don't have the default profile, AWS CLI will return this error. This could also occur if you have an IAM role attached to the EC2 instance and you don't specify the --profile option in your command.

    You can try exporting the credentials as mentioned in this document and try the command again.