seratch/AWScala

S3 client for public bucket

francescoperera opened this issue · 1 comments

Hi, this might be a trivial question but I am working on an s3 data ingestion pipeline. Given a url (whether its pointing to a public or private bucket), I need to get the file content.
I have my code working on a private bucket ( by providing appropriate user credentials) but I am still trying to figure out how to generalize the code to accommodate a url pointing to a public bucket.
With a public bucket, I do not need credentials, so I initialize the s3 client as :

val s3 = S3()

but my Scala application will not compile as it will give me the following error:
java.lang.IllegalStateException: Failed to load AWS credentials!

How do I load the client for a public bucket or without using credentials?

Any tips would be appreciated. Thanks.

How do I load the client for a public bucket or without using credentials?

It's unsupported right now.