无法在指定区域中创建Amazon S3 Bucket

时间:2017-03-21 19:32:26

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

在我的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]:

1 个答案:

答案 0 :(得分:3)

From the documentation" us-east-1以外的区域需要指定相应的LocationConstraint才能在所需区域中创建存储区"

尝试:

aws s3api create-bucket --region us-west-1 --bucket textbucket --create-bucket-configuration LocationConstraint=us-west-1
相关问题