AWScala icon indicating copy to clipboard operation
AWScala copied to clipboard

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

Open somanythings opened this issue 8 years ago • 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;

somanythings avatar Jun 10 '16 14:06 somanythings

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

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

maartenh avatar Nov 08 '16 15:11 maartenh