- Newest
- Most votes
- Most comments
Hello.
You need to check whether you have registered the correct access key and secret access key.
I think a file called ".aws/credentials" has been created in the user's home directory, so please check whether the access keys etc. listed in this file are correct.
Hi Reciticus,
As Riku suggested, verify that the ACCESS_KEY and SECRET_ACCESS_KEY you copied when you created the IAM user appears correctly in the AWS CLI config file. The credentials file is located at ~/.aws/credentials on Linux or macOS, or at C:\Users\USERNAME.aws\credentials on Windows.
If you just copied the SECRET_ACCESS_KEY from the IAM create-user screen without downloading the CSV file, you will not be able to retrieve it again. In that case, in the IAM console, open the user you created, then in the access keys section, first deactivate then delete the access key and then repeat the steps to create a new access key, downloading the csv file.
Once done, you'll need to update the local AWS CLI configure file. You can either edit the file directly or open a shell and enter
aws configure --profile default
(change default
to whatever profile name you used if you didn't use default
). See Configuration and credential file settings for more info.
BTW, check out this issue someone raised with the exact same situation you described.
Relevant content
- asked a month ago
- asked 10 months ago
- asked 10 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago