我想从 Bucket1
移动我的所有数据帐户A
至 Bucket2
帐户B
.
为了这:
AWS CLI
对于 Windows。IAM
凭证使用命令 aws configure
(这些凭据来自帐户 B
)aws s3 sync s3://Bucket1 s3://Bucket2
我收到以下错误:fatal error: An error occured (InvalidRequest) when calling the ListObject operation: You are attempting to operate on a bucket in a region that requires Signature Version 4. You can fix this issue by explicitly providing the correct region location using the --region argument, the AWS_DEFAULT_REGION environment variable, or the region variable in the AWS CLI configuration file. You can get the bucket's location by running "aws s3api get-bucket-location --bucket BUCKET".
如何解决这个错误?
aws --version
aws-cli/1.11.61 Python/2.7.9 windows/8 botocore/1.5.24
最佳答案
我的 S3
网址就像:https://console.aws.amazon.com/s3/home?region=us-east-1
所以我认为 us-east-1
是我的地区,但实际上不是!
我使用 AWS 命令查找 Bucket2
地区,它告诉我一个不同的地区。
然后我用了这个命令 aws s3 sync s3://Bucket1 s3://Bucket2 --region Asia Pacific (Mumbai)
一切正常!
关于amazon-web-services - aws cli 签名版本 4,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42872112/