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

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.
답변함 일 년 전
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
전문가
답변함 일 년 전
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
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠