I use Boto to try to get a bucket in Amazon S3, but it returns a Bad Request when I use get_bucket () for some of the buckets. I'm starting to wonder if this is a bug with Boto, since I can get the bucket using get_all_buckets ().
>>> from boto.s3.connection import S3Connection >>> conn = S3Connection(S3_ACCESS_KEY, S3_SECRET_KEY) >>> buckets = conn.get_all_buckets() >>> buckets [<Bucket: mysite-backups>] >>> buckets[0] <Bucket: mysite-backups> >>> conn.get_bucket('mysite-backups') Traceback (most recent call last): File "<console>", line 1, in <module> File "/path/to/virtualenv/lib/python2.7/site-packages/boto/s3/connection.py", line 502, in get_bucket return self.head_bucket(bucket_name, headers=headers) File "/path/to/virtualenv/lib/python2.7/site-packages/boto/s3/connection.py", line 549, in head_bucket response.status, response.reason, body) S3ResponseError: S3ResponseError: 400 Bad Request >>> conn.create_bucket('mysite_mybucket') <Bucket: mysite_mybucket> >>> conn.get_bucket('mysite_mybucket') <Bucket: mysite_mybucket>
This seems to be a problem even if I log in with the same user account when I use access accounts and create them from the AWS console.
Any idea why this could be happening?
python amazon-s3 boto
seddonym
source share