seratch/AWScala

S3.bucket(name:String) is implemented in terms of listBuckets

somanythings opened this issue · 1 comments

A client doesn't necessarily have the listBuckets permission, but can getObject(bucketName). Using s3.bucket(bucketName) in this case results in exceptions like:
com.amazonaws.services.s3.model.AmazonS3Exception: Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied;

Ran into this as well, and worked around it by just creating a Bucket instance directly:

val bucket: Bucket = Bucket("some-bucket-name")