peterknife / boto

Automatically exported from code.google.com/p/boto
0 stars 0 forks source link

problems with european s3 buckets #225

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

calling conn.get_bucket(bucketname) with an european bucket gives me the
following exception:

boto.exception.S3ResponseError: S3ResponseError: 403 Forbidden

Error message from amazon:

"The request signature we calculated does not match the signature you
provided. Check your key and signing method."

I'm using boto-1.7a. Works well with us-located buckets, also
conn.get_all_buckets() works right, listing all my buckets.

Have I overlooked something about working with eu located buckets?

Greetings 
Martin

Original issue reported on code.google.com by martin.b...@gmail.com on 20 Apr 2009 at 10:40

GoogleCodeExporter commented 9 years ago
That is the Traceback:

Traceback (most recent call last):
  File "./s3dev.py", line 34, in <module>
    bucket = conn.get_bucket('video-pp')
  File
"/path/virtualenv/lib/python2.5/site-packages/boto-1.7a-py2.5.egg/boto/s3/connec
tion.py",
line 237, in get_bucket
    rs = bucket.get_all_keys(None, maxkeys=0)
  File
"/path/virtualenv/lib/python2.5/site-packages/boto-1.7a-py2.5.egg/boto/s3/bucket
.py",
line 214, in get_all_keys
    raise S3ResponseError(response.status, response.reason, body)
boto.exception.S3ResponseError: S3ResponseError: 403 Forbidden

Original comment by martin.b...@gmail.com on 20 Apr 2009 at 11:04

GoogleCodeExporter commented 9 years ago
Are you still experiencing this problem?  I am unable to reproduce it.  I have 
an EU
bucket called "garnaat-eu" and I am able to get a listing of all keys in the 
bucket.
 From the error you are getting, it really looks as if the credentials you are using
to access the bucket are not authorized for access.

Original comment by Mitch.Ga...@gmail.com on 21 Apr 2009 at 11:37

GoogleCodeExporter commented 9 years ago
Yes, but only behind a proxy, I found out!

I've tried it in an environment without proxy and it worked. 

But I also crosschecked my european buckets with s3cmd and it works even behind 
the
proxy. 

By tracing around I recognized following: When stripping the bucket-name from
variable auth_path in connection.py Line 303 the authentication for european 
buckets
will happen. I will also get an BucketList-Object, but with no entries. On the 
other
hand the authentication for US-buckets will fail with this modified auth_path.

Original comment by martin.b...@gmail.com on 22 Apr 2009 at 8:16