cant access s3 via CLI


aws s3 sync s3://fast-ai-imageclas/cifar10 s3://myvirginiabucket/fast-ai-imageclas/cifar10 fatal error: An error occurred (SignatureDoesNotMatch) when calling the ListObjectsV2 operation: The request signature we calculated does not match the signature you provided. Check your key and signing method. (base) ✘ ✝  Downloads/software/REPOS  aws configure list Name Value Type Location ---- ----- ---- -------- profile <not set> None None access_key ****************IB7X shared-credentials-file secret_key ****************IB7X shared-credentials-file region us-east-1 config-file ~/.aws/config

the user has access to S3. this is the users policy: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:" ], "Resource": "" } ] }

3 Respostas

The error above suggests that there is an issue with the signature of the request. This could indicate an incorrect access key or secret key, or a problem with the signing method being used. To resolve the issue, you can try this

  • Check that the access key and secret key being used are correct. aws configure
  • Check that the AWS CLI is configured to use the correct region. aws configure list
  • Check that the user has the necessary permissions to access the S3 bucket. You can do this by checking the policy attached to the user's IAM role, and ensuring that it grants the necessary permissions for the S3 bucket.
  • Double check that the S3 bucket name is correct and that the user has permissions to access it.
respondido há um ano


This error is usually related with the AWS credentials, so I recommend you take the following actions:

  1. Open the ~/.aws/credentials file and check that aws_access_key_id and aws_secret_access_key values matches your IAM user credentials.
  2. Check that you have not set the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables, since AWS cli will use those values instead what is defined at the ~/.aws/credentials file.
  3. Finally, if the error still persists, check that the time on the system is in sync to the current time.
profile picture
respondido há um ano

In addition to the above, specify --profile on the command to use the specific profile in your ~/.aws/credentials file. This will override any environment variables or instance profile (if running from EC2).

You can also check who you are by running aws sts get-caller-identity --profile YOUR_PROFILE_NAME.

profile pictureAWS
respondido há um ano

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas