'Opens connection to S3 returning bucket and key'

def open_s3(self):

    conn = boto.connect_s3(self.AWS_ACCESS_KEY_ID, self.AWS_SECRET_ACCESS_KEY, **self.get_s3connection_kwargs())
    try:
        bucket = conn.get_bucket(self.AWS_BUCKET_NAME)
    except boto.exception.S3ResponseError:
        bucket = conn.create_bucket(self.AWS_BUCKET_NAME)
    return (bucket, boto.s3.key.Key(bucket))
