1
votes

I'm using the AWS CLI and have configured the access key, secret key and region.

Also configured the session key provided for the my account as an Env variable to access the AWS environments of my company.

But for some reason I always get the "Invalid access key error, access key does not exists in records".

I've verified that my ~/.aws/config file has valid key values for all the keys which matches with the aws configure list.

I'm using windows 10 and configured aws cli . I've admin access and valid IAM roles .

I always get "An error occurred (InvalidAccessKeyId) when calling the ListBuckets operation: The AWS Access Key Id you provided does not exist in our records"

enter image description here

what am I missing ?

1
Are you using access key and secret key that go with your session token or are you using your IAM access key and secret key with the session token you generated? It sounds like the latter, but needs to be the former.Brandon Miller
@BrandonMiller yes I'm using the access key and secret key which goes with the session token.Govind Kalyankar

1 Answers

0
votes

I got it working after I set AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_SESSION_TOKEN as an Environment variable .

Earlier I did not have env variables set but I was configuring those variables by using AWS CLI and verifying the .config file which contains correct keys.

Strange it worked after setting env variables but did not work by using only aws cli .