[英]How to access S3 bucket created in us-west-2 region from us-east-1 account?
[英]s3api get-bucket-location returns null for us-east-1 bucket
不知道為什么會發生這種情況,但是為位置調用獲取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
}
us-east-1是某個AWS文檔中討論的特定區域,如下所示:
https://aws.amazon.com/fr/blogs/developer/leveraging-the-s3-and-s3api-commands/
例如,如果我使用s3命令在法蘭克福地區創建一個桶:
$ aws s3 mb s3://myeucentral1bucket --region eu-central-1 make_bucket: s3://myeucentral1bucket/`
然后我可以使用s3api get-bucket-location來確定我新創建的存儲區的區域:
$ aws s3api get-bucket-location --bucket myeucentral1bucket { "LocationConstraint": "eu-central-1" }
如上所示,輸出JSON中
LocationConstraint
成員的值是存儲桶的預期區域eu-central-1
。 請注意,對於在美國標准區域us-east-1中創建的存儲區,LocationConstraint的值將為null。 有關位置約束如何與區域對應的快速參考,請參閱AWS區域和端點指南。
http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
如果使用US East(N。Virginia)端點以外的區域來創建存儲區,則必須將LocationConstraint存儲區參數設置為相同的區域
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.