IBM Cloud COS:使用S3 API get-bucket-location返回未找到的存储桶 [英] IBM Cloud COS: Using S3 API get-bucket-location returns bucket not found
问题描述
我正在使用IBM Cloud COS的S3 API,并且在get-bucket-location中遇到意外的未找到存储桶的错误.
I'm using the S3 API for IBM Cloud COS and am getting unexpected bucket not found errors from get-bucket-location.
我的存储桶位于us-south地区,并显示s3 ls命令,但获取该地区失败.我正在使用Java AWS api,但可以使用aws cli来重现它.
My bucket exists in the us-south region and shows up the s3 ls command, but getting the region is failing. I'm using the java AWS api, but can reproduce it with the aws cli.
[08:07] jwilliams:~ $ aws --profile ibm --endpoint-url https://s3-api.us-geo.objectstorage.softlayer.net s3api get-bucket-location --bucket s3-wzd-dv-integrationtest-so-1
An error occurred (NoSuchBucket) when calling the GetBucketLocation operation: The specified bucket does not exist.
[08:07] jwilliams:~ $ aws --profile ibm --endpoint-url https://s3-api.us-geo.objectstorage.softlayer.net s3 ls
2018-12-05 10:06:00 s3-wzd-dv-integrationtest-ea-1
2018-12-05 10:04:51 s3-wzd-dv-integrationtest-so-1
2018-11-29 15:59:19 wzd-jw-bucket-1
2018-11-29 16:14:55 wzd-jw-bucket-2
推荐答案
当您创建了"Regional"存储分区而非"Cross-Region"存储分区时,会发生这种类型的错误.您可以从IBM Cloud控制台验证存储桶的位置.存储桶->配置还将为您提供可以使用的公共URL.
This type of error occurs when you have created "Regional" bucket instead of "Cross-Region". You can verify the location of the bucket from the IBM Cloud console. Bucket -> Configuration would also provide you with the public URL you can use.
根据地区,尝试以下操作:
Depending on the region, try these:
aws --profile ibm --endpoint-url https://s3.us-east.objectstorage.softlayer.net s3 ls
aws --profile ibm --endpoint-url https://s3.us-south.objectstorage.softlayer.net s3 ls
这篇关于IBM Cloud COS:使用S3 API get-bucket-location返回未找到的存储桶的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!