List files on S3


I’m getting frustrated by not finding any good explanation on how to list all files in a S3 bucket.

I have this bucket with about 20 images on. All I want to do is to list them. Someone says “just use the S3.list-method”. But without any special library there is no S3.list-method.
I have a S3.get-method, which I dont get to work. Arggh, would appreciate if someone told me how to simply get an list of all files(filenames) from an S3 bucket.

returns an Future[Response]

I dont know how to use this S3.get.
What would be the easiest way to list all files in my S3 bucket?

Answers much appreciated!


Using the library here:

You should be able to do something like this:

You’ll have to tweak this a bit in regards to your credentials, but the examples show how to do that.

Leave a Reply