2019-03-22 06:54 阅读 94

使用S3 Golang SDK从S3下载选择性文件

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.

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

  • 已采纳
    dongmacuo1193 dongmacuo1193 2019-03-22 10:14

    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.

    点赞 评论 复制链接分享