Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Partial credentials found in env, missing: AWS_SECRET_ACCESS_KEY

Just configured the AWS CLI on my computer with my AWS Access and Secret Key. When I try to use the AWS CLI though it gives me this error.

Partial credentials found in env, missing: AWS_SECRET_ACCESS_KEY

I went to ~/.aws/config, and sure enough those credentials are there, including the AWS Secret Key, so I'm not sure why its squawking at me.

like image 281
TJB Avatar asked Feb 13 '18 18:02

TJB


2 Answers

You should have this file ~/.aws/credentials and the contents should be in the following format:

[default]
aws_access_key_id = XXXXXXXXXXXXXXXXXX
aws_secret_access_key = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
like image 128
Carlos Rodriguez Avatar answered Nov 20 '22 12:11

Carlos Rodriguez


For anyone who is having the same problem - this is solution that worked for me:

If you are on Windows - check if you don't have AWS_ACCESS_KEY_ID set in your system variables. AWS CLI uses something called configuration provider chain - and environment variables take precedence over configuration file. In my case somehow I had only set AWS_ACCESS_KEY_ID thus the error message.

like image 39
saku Avatar answered Nov 20 '22 11:11

saku