How to list _all_ objects in Amazon S3 bucket?

前端 未结 4 1353
旧巷少年郎
旧巷少年郎 2021-02-06 23:19

S3Client.ListObjects return only 1000 of objects. How to retrieve list of all existing objects using Amazon C# library?

4条回答
  •  说谎
    说谎 (楼主)
    2021-02-07 00:13

    According to the documentation the client uses pagination in the case you describe. As per documentation you should use IsTruncated on the result... if it is true call ListObjects again with correctly setup Marker to get the next page etc. - stop calling when IsTruncated returns false.

提交回复
热议问题