amazon-web-services - aws cli 签名版本 4

标签 amazon-web-services amazon-s3 aws-cli

我想从 Bucket1 移动我的所有数据帐户ABucket2帐户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/

    相关文章:

    reactjs - 移动到 Cloudfront + SSL 后,应用程序中的 React 路由器链接损坏

    amazon-web-services - 如何从 AMI id 查找有关 EC2 实例的信息?

    amazon-web-services - AWS S3 CLI 中的选择性文件下载

    python-3.x - 从 AWS Lambda 上的 S3 读取文件时出现 IncompleteReadError

    javascript - 什么是 process.env.NODE_ENV

    java - 如何从分布式环境访问位于 S3 存储桶中的 DBFS 文件?

    amazon-web-services - 有没有办法从 CloudFormation 中删除其痕迹?

    c# - AWS SES 从版本 2 升级到版本 4?

    amazon-web-services - AWS CLI 可以与联合登录一起使用吗?

    amazon-s3 - s3cmd、boto 和 AWS CLI 之间的区别