Sto usando Boto per provare a ottenere un bucket in Amazon S3, ma restituisce Bad Request quando uso get_bucket() per alcuni di i secchi. Sto iniziando a chiedermi se questo è un bug con Boto, dato che posso ottenere il bucket usando get_all_buckets().get_bucket() restituisce 'Bad Request' per i bucket S3 che non ho creato tramite Boto
>>> 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>
questo sembra essere un problema, anche se entro con lo stesso account utente come sto usando le creds di accesso per e creare dall'interno della console AWS.
Qualche idea sul perché questo potrebbe accadere?
Francoforte richiedere SSL SIGv4, vedi https://github.com/boto/boto/issues/2741 – andpei