IBM Cloud COS: Using S3 API get-bucket-location returns bucket not found

倾然丶 夕夏残阳落幕 提交于 2019-12-11 17:08:38

问题


I'm using the S3 API for IBM Cloud COS and am getting unexpected bucket not found errors from get-bucket-location.

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

回答1:


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


来源:https://stackoverflow.com/questions/53652258/ibm-cloud-cos-using-s3-api-get-bucket-location-returns-bucket-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!