jca*_*way 6 amazon-s3 amazon-web-services
不知道为什么会发生这种情况,但是位置呼叫的结果为null
aws --version
aws-cli/1.10.62 Python/2.7.11 Darwin/16.1.0 botocore/1.4.52
aws> s3api get-bucket-location --bucket joshuacalloway-us-east-2-bucket
{
"LocationConstraint": "us-east-2"
}
aws> s3api get-bucket-location --bucket joshuacalloway-us-east-1-bucket
{
"LocationConstraint": null
}
Run Code Online (Sandbox Code Playgroud)
us-east-1是一个特定区域,如下某些AWS文档所述:
https://aws.amazon.com/fr/blogs/developer/leveraging-the-s3-and-s3api-commands/
例如,如果我使用s3命令在法兰克福地区创建一个存储桶:
Run Code Online (Sandbox Code Playgroud)$ aws s3 mb s3://myeucentral1bucket --region eu-central-1 make_bucket: s3://myeucentral1bucket/`然后,我可以使用s3api get-bucket-location确定我新创建的存储桶的区域:
Run Code Online (Sandbox Code Playgroud)$ aws s3api get-bucket-location --bucket myeucentral1bucket { "LocationConstraint": "eu-central-1" }如上所示,
LocationConstraint输出JSON中成员的值是存储桶的预期区域eu-central-1。请注意,对于在美国标准区域us-east-1中创建的存储桶,LocationConstraint的值为空。有关位置约束如何与区域对应的快速参考,请参阅《 AWS区域和端点指南》。
http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
如果您使用美国东部(弗吉尼亚北部)端点以外的其他区域创建存储桶,则必须将LocationConstraint存储桶参数设置为同一区域
| 归档时间: |
|
| 查看次数: |
1639 次 |
| 最近记录: |