AWS eb init not a valid key=value pair (missing equal-sign)
Asked Answered
L

2

6

I was trying to set up a basic rails app and deploy it to Elastic Beanstalk. I ran eb init, picked my region and it asked for (aws-access-id): and (aws-secret-key):. For what ever reason it wasn't accepting my credentials and without realizing it at one point I had accidentally ran a command eb --version in the (aws-access-id): line. Now I can't get past choosing my region. I get

ERROR: ServiceError - '--version/20190924/us-west-2/elasticbeanstalk/aws4_request' not a valid key=value pair (missing equal-sign) in Authorization header: 'AWS4-HMAC-SHA256 Credential=eb --version/20190924/us-west-2/elasticbeanstalk/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=afc27125738fef1062fc8565e130ced6e0f7b2c343c2e28456d7693c8f396c92'.

I have been looking for a solution for countless hours now and can't find anything. I tried deleting .elasticbeanstalk file(some had mentioned), uninstalling it altogether, aws configure and put in the proper credentials, followed other stackoverflow questions. Nothing seems to work and the error will not go away. Tried looking up how to reset the headers. Not sure why this was saved in the first place. I feel it should have just given me wrong credentials if anything.

WS eb init missing equal-sign error

I am on a mac.

Lynellelynett answered 24/9, 2019 at 12:17 Comment(0)
L
5

Okay, finally figured it out thanks to the link in my question to another similar stack overflow question. What I did was cd to my root directory where I finally did $ ls -a to see hidden files and saw .aws. I $ cd .aws and then ran $ open config. It open this

aws_access_key_id = eb --version
aws_secret_access_key = ENTER_SECRET_HERE

[default]
output = json
region = 3

Changed the key_id and access_key and it worked! Hope it helps out someone else before going insane.

Lynellelynett answered 24/9, 2019 at 12:49 Comment(0)
P
0

in order to find the problem I used the cmd

eb init --verbose --debug

which included the output "...not a valid key=value pair (missing equal-sign) in Authorization header..."

I then googled that and was lead to your post. thanks!

Peremptory answered 11/1, 2023 at 14:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.