Trouble with ‘eb init’ - Wrong Credentials Error on AWS Elastic Beanstalk

0

I’ve been trying to set up my application on AWS Elastic Beanstalk using the EB CLI. Despite creating new keys and updating my AWS configuration multiple times, I keep encountering a ‘wrong credentials’ error when running eb init. I’ve checked my .aws/credentials file and confirmed that the access ID and secret key are correct. I’ve also tried running eb init with the --debug option for more detailed logs, but I’m still stuck. Has anyone else faced this issue, and how did you resolve it?

asked 7 months ago430 views
2 Answers
0

Hello,

If you think you've configured the access and secret key correctly, as a first step I would recommend to run this command to ensure your credentials are working correctly. This command should return details about your IAM user if the credentials are correct.

aws sts get-caller-identity
profile picture
EXPERT
answered 7 months ago
  • An error occurred (InvalidClientTokenId) when calling the GetCallerIdentity operation: The security token included in the request is invalid. i got this error

  • Hi,

    Run aws configure list to check if it matches the secret and access key or I would recommend to recreate the secret and access key in the IAM console and try rerunning eb init again.

0

Hello.

Does it match the access key etc. that can be checked with the command below?

aws configure list

Also, access keys have a priority order of loading, and even if they are set in the Credentials file, if the access key is set in an environment variable, it will be loaded from the environment variable.
Therefore, please check whether the access key is set in the environment variable.
https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html#configure-precedence

profile picture
EXPERT
answered 7 months ago
profile picture
EXPERT
reviewed 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions