Wed Sep 15 2021·2 min read
Photo by Vilde Evelyn
The "AWS Access Key Id does not exist in our records" error occurs when the access key id configured for the AWS CLI is invalid.
In order to solve the "AWS Access Key Id does not exist in our records" error:
AWS_SECRET_ACCESS_KEYenvironment variables and make sure the values are correct:
# Linux and macOS echo $AWS_ACCESS_KEY_ID echo $AWS_SECRET_ACCESS_KEY # on Windows with CMD echo %AWS_ACCESS_KEY_ID% echo %AWS_SECRET_ACCESS_KEY% # on Windows with PowerShell echo $Env:AWS_ACCESS_KEY_ID echo $Env:AWS_SECRET_ACCESS_KEY
If the environment variables are not set, verify the value of the
aws_access_key_id variable in your credentials file.
The credentials file is located at
macOS and at
The syntax of the credentials file should look like:
[default] aws_access_key_id=YOUR_ACCESS_KEY_ID aws_secret_access_key=YOUR_SECRET_ACCESS_KEY [admin] aws_access_key_id=YOUR_ACCESS_KEY_ID aws_secret_access_key=YOUR_SECRET_ACCESS_KEY
aws_secret_access_keyin single, nor double quotes.
If you want to reconfigure the credentials for the AWS profile, run the
aws configure command:
# configure the default profile aws configure # configure the admin profile aws configure --profile admin
When working with temporary credentials, issued by the Security Token Service API, the response includes the access / security keys and a session token. Make sure you set the value for all 3 variables in your subsequent API request.
Omitting the value of the session token often causes this error.
I'll send you 1 email a week with links to all of the articles I've written that week