Why does the AWS cli give me an InvalidAccessKeyId error when I can use the same credits for s3cmd?

AWS cli brings me back

A client error (InvalidAccessKeyId) occurred when calling the ListBuckets operation: The AWS Access Key Id you provided does not exist in our records.

However, I can use distop as well as s3md using the same credentials. What is the problem?

+3


source to share


1 answer


For anyone else running into this issue, check your environment variables. Apparently the CLI uses them before using anything in the credential file.



I'm on a Mac, so removing the offending env variables from the ~ / .profile did the trick.

+5


source







All Articles