Search code examples
javaamazon-web-servicesamazon-s3cloudaws-java-sdk

Bulk objects download in Amazon s3


In Amazon S3, I have created 1 bucket under that bucket multiple subfolders like <bucket_name>/<year>/<month>/<day>/files (i.e.objects).

I want functionality where on request I can download bulk objects by year / month / day, all files in zip.

Is there any way I can do this by Amazon Java SDK?


Solution

  • There is a MultipleFileDownload method provided with the Transfer Manager library that provides Multiple file download of an entire virtual directory. The contents, however, is not zipped.

    See: MultipleFileDownload javadoc

    Since your objects are in directories by year/month/day, you could use this method to download all files in a specific path. However, the files would not be zipped.