Forkmohit
Forkmohit

Reputation: 753

Download selective files from S3 using S3 Golang SDK

I am using Golang SDK to communicate with AWS S3. I want to download only those files from a folder, that ends with .txt or .lib.

Upvotes: 2

Views: 1456

Answers (1)

Nik
Nik

Reputation: 3215

AWS SDK does not have this possibility. You can list objects in a bucket, filter the output based on your needs and get a single object using getObject. see here GetObject and here ListObjects

Another option can be to mount AWS S3 bucket on your machine/server using e.g. s3fs-fuse and filter the files you need in order to get the list to download.

Upvotes: 2

Related Questions