How can I tell how many objects I've stored in an S3 bucket?

后端 未结 29 3696
逝去的感伤
逝去的感伤 2020-12-02 04:45

Unless I\'m missing something, it seems that none of the APIs I\'ve looked at will tell you how many objects are in an /. Is ther

29条回答
  •  借酒劲吻你
    2020-12-02 05:22

    The api will return the list in increments of 1000. Check the IsTruncated property to see if there are still more. If there are, you need to make another call and pass the last key that you got as the Marker property on the next call. You would then continue to loop like this until IsTruncated is false.

    See this Amazon doc for more info: Iterating Through Multi-Page Results

提交回复
热议问题