vsingh
vsingh

Reputation: 135

Getting error "The AWS Access Key Id you provided does not exist in our records" when trying to sync

I am trying to download all the available files from my s3 bucket to my local machine. I have installed AWS cli. and then I have used aws configure to setup access key and secret key too. I am facing issue while trying to execute the following command:

$ aws s3 sync s3://tempobjects .

Setup commands

LAMU02XRK97:s3 vsing$ export AWS_ACCESS_KEY_ID=*******kHXE
LAMU02XRK97:s3 vsing$ export AWS_SECRET_ACCESS_KEY=******Ssv

LAMU02XRK97:s3 vsing$ aws configure list
      Name                    Value             Type    Location
      ----                    -----             ----    --------
   profile                <not set>             None    None
access_key     ****************kHXE shared-credentials-file    
secret_key     ****************pSsv shared-credentials-file    
    region                us-east-1      config-file    ~/.aws/config

Error:

LAMU02XRK97:s3 vsing$ aws s3 sync s3://tempobjects .
fatal error: An error occurred (InvalidAccessKeyId) when calling the ListObjectsV2 operation: The AWS Access Key Id you provided does not exist in our records.

Upvotes: 1

Views: 18475

Answers (1)

Pacifist
Pacifist

Reputation: 3203

I have replicated the scenario and to make it work you need to make sure that the user you are using for CLI is having the same access keys configured in the IAM.

Below is what configured in AWS CLI.

enter image description here

Below is what configured in AWS IAM for the same user :

enter image description here

Access Key ending with QYHP is configured at both the places and hence it is working fine for me.

Upvotes: 3

Related Questions