无法在指定区域创建 Amazon S3 Bucket
Cannot create Amazon S3 Bucket in specified region
在我的 macOS Sierra 上:
$ aws s3api create-bucket --bucket testbucket --region us-west-1
{
"Location": "/testbucket"
}
然后...
$ aws s3api get-bucket-location --bucket testbucket
{
"LocationConstraint": null
}
奇怪的是,如果我要检查我的 console,它会显示我的存储桶已创建但在美国东部(弗吉尼亚北部地区)。是 us-west-1 区域不可用还是什么?
如果有所不同,从
$ aws configure
我可以看到我的默认区域名称是 us-west-1
Default region name [us-west-1]:
From the documentation: "Regions outside of us-east-1 require the appropriate LocationConstraint to be specified in order to create the bucket in the desired region"
尝试:
aws s3api create-bucket --region us-west-1 --bucket textbucket --create-bucket-configuration LocationConstraint=us-west-1
在我的 macOS Sierra 上:
$ aws s3api create-bucket --bucket testbucket --region us-west-1
{
"Location": "/testbucket"
}
然后...
$ aws s3api get-bucket-location --bucket testbucket
{
"LocationConstraint": null
}
奇怪的是,如果我要检查我的 console,它会显示我的存储桶已创建但在美国东部(弗吉尼亚北部地区)。是 us-west-1 区域不可用还是什么?
如果有所不同,从
$ aws configure
我可以看到我的默认区域名称是 us-west-1
Default region name [us-west-1]:
From the documentation: "Regions outside of us-east-1 require the appropriate LocationConstraint to be specified in order to create the bucket in the desired region"
尝试:
aws s3api create-bucket --region us-west-1 --bucket textbucket --create-bucket-configuration LocationConstraint=us-west-1