- Newest
- Most votes
- Most comments
First thing to do is verify the keys are current aws iam list-access-keys and confirm the status is active.
Then aws configure list and you should be able to see the last four characters of the access key & the secret key. Do these match up with the key that you created?
Verify that the access key and secret access key are correct by using the following command.
Also, try restarting the shell after changing the access key and secret access key settings.
aws configure list
That error can also occur if the access key or secret access key is incorrect or if the region is spelled incorrectly, so please check.
Also, check to see if there are any access keys, etc. set in the shell environment variables.
If it is set in a shell environment variable, it has a higher priority to be read than the credential file and should be removed.
echo $AWS_SECRET_ACCESS_KEY
echo $AWS_ACCESS_KEY_ID
Deletion can be done with the following command.
unset AWS_ACCESS_KEY_ID
unset AWS_SECRET_ACCESS_KEY
This post is closed: Adding new answers, comments, and votes is disabled.
Relevant content
- asked 3 years ago
- AWS OFFICIALUpdated 10 months ago
