2019-03-22 06:54
浏览 197

使用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.

图片转代码服务由CSDN问答提供 功能建议

我正在使用Golang SDK与AWS S3通信。 我只想从以.txt或.lib结尾的文件夹中下载那些文件。

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • 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.

    点赞 打赏 评论

相关推荐 更多相似问题