libs3
libs3 copied to clipboard
Bucket list returns permanent redirect
I've just built libs3 for Windows and I'm using it to query my S3 bucket. The first attempt goes well: "s3 list" returns "mybucket" "s3 test mybucket" returns a status of "ap-southeast-2"
But trying to list the contents of the bucket fails with a permanent redirect: "s3 list mybucket" ERROR: ErrorPermanentRedirect Message: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint. Extra Details: Bucket: mybucket Endpoint: mybucket.s3.amazonaws.com
"s3 list mybucket.s3.amazonaws.com" returns: ERROR: ErrorNoSuchBucket Message: The specified bucket does not exist
Searching around I find there's a problem when you're bucket wasn't created in the US (e.g. https://forums.aws.amazon.com/message.jspa?messageID=196878). So I try: "s3 list mybucket.s3-ap-southeast-2.amazonaws.com" but again I get: ERROR: ErrorNoSuchBucket Message: The specified bucket does not exist
Reading the issue above, I tried: "s3 list http://s3-ap-southeast-2.amazonaws.com/mybucket/" but that returns: ERROR: InvalidBucketNameCharacter
This works fine using the AWS C# library so I assume libs3 isn't handling a redirection message or something.
i meet the same problem, there is no interface to set region.
We're planning to move to Amazon's own C++ SDK: https://aws.amazon.com/blogs/aws/introducing-the-aws-sdk-for-c/