How do I resolve the error "AWS Access Key Id does not exist" when I tried to access my Amazon S3 bucket?

2 minute read
0

I tried to access my Amazon Simple Storage Service (Amazon S3) bucket, but I received the following error: "The AWS Access Key Id you provided does not exist in our records".

Resolution

This error occurs because there's an issue with the credentials that you used. The access key that you used might have been deleted or is inactive. Or, the associated AWS Identity and Access Management (IAM) role or user associated with the Amazon S3 bucket might have been deleted or doesn't exist.

Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshoot AWS CLI errors. Also, make sure that you're using the most recent AWS CLI version.

To resolve this issue, check the user credentials that you used to make sure that they are valid. Run the following AWS CLI command to list the stored access keys:

aws configure list

You can also run the get-caller-identity AWS CLI command to get details on the IAM credentials you used to call the API:

aws sts get-caller-identity

To use the AWS SDK to get user credentials, run the GetCallerIdentity API action:

If you used an IAM role to access your Amazon S3 bucket, then follow these steps to verify that the role exists:

  1. Open the IAM console.
  2. Choose Roles.
  3. In Role name, confirm that the IAM role exists. If the role doesn't exist, then create a new IAM role.

If you used an IAM user to access your S3 bucket, then follow these steps to verify that the user exists and check the credentials:

  1. Open the IAM console.
  2. Choose Users.
  3. In User name, verify that the IAM user exists. If the user doesn't exist, then create a new IAM user.
  4. If the IAM user exists, then choose the IAM username to view the details of the IAM user object.
  5. Choose the Security credentials tab, and then check whether the associated Access keys appear. If the access keys are missing or inactive, then create new access keys or activate the keys.

Note: If you used a session token, then make sure to pass the session token with the access key and secret key.

No comments