Q:

boto s3 Bucket versus get_bucket

I try to access a key inside a bucket, for which I don't have permissions, though I do for the key.
In order to be able to do get_key('this/is/my_key'), I need the bucket object:
conn = boto.connect_s3(key, secret_key)
my_bucket = conn.get_bucket('a_bucket')

yields S3ResponseError: S3ResponseError: 403 Forbidden. 
On the other hand, the following works
my_bucket = boto.s3.bucket.Bucket(conn, 'a_bucket')
my_bucket.get_key('this/is/my_key')

Question: What is the difference between creating the object Bucket and using the get_bucket method?
Checking the docu I only see the check for validation. Anything else?

A:

Validation (validate=True default) in the get_bucket checks for bucket's existence when called. Since you don't have access to the bucket, your request is turned down (403). In the other case, the class instantiation doesn't seem to do the validation, hence the get_key method works as intended.

