cant access s3 via CLI

0

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": "" } ] }

已提问 1 年前1213 查看次数
3 回答
0

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.
已回答 1 年前
0

Hi,

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
专家
已回答 1 年前
0

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
专家
kentrad
已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则

相关内容