How do I delete/count objects in a s3 bucket?

前端 未结 6 733
借酒劲吻你
借酒劲吻你 2021-02-01 10:15

So I know this is a common question but there just doesn\'t seem to be any good answers for it.

I have a bucket with gobs (I have no clue how many) number of files in th

6条回答
  •  野的像风
    2021-02-01 11:03

    1) Regarding your first question, you can list the items on a bucket without actually retrieving them. You can do that both with the SOAP and the REST API. As you can see, you can define the maximum number of items to list and the position to start the listing from (the marker). Read more about it here.

    I do not know of any implementation of the paging, but especially for the REST interface it would be very easy to implement it in any language.

    2) I believe the only way to delete a bucket is to first empty it from all items. See alse this question.

    3) I would say that S3 is very well suited for storing a large number of files. It depends however on what you want to do. Do you plan to also store binary files? Do you need to perform any queries or just listing the files is enough?

提交回复
热议问题