我怎么知道有多少对象,我存储在S3存储桶? [英] How can I tell how many objects I've stored in an S3 bucket?

查看:367
本文介绍了我怎么知道有多少对象,我存储在S3存储桶?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

除非我失去了一些东西,似乎没有我看着这些API会告诉你有多少对象是一个S3桶/文件夹(preFIX)。有没有什么办法让一个计数?

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 S3 bucket / folder(prefix). Is there any way to get a count?

推荐答案

有没有办法,除非你

  1. 全部列出来的1000批(这可能会很慢吸带宽 - 亚马逊似乎永远COM preSS的XML响应),或

  1. list them all in batches of 1000 (which can be slow and suck bandwidth - amazon seems to never compress the XML responses), or

登录到S3上的帐户,然后转到账户 - 使用。看来计费部门知道你到底有多少对象已存储!

log into your account on S3, and go Account - Usage. It seems the billing dept knows exactly how many objects you have stored!

简单地下载所有对象的列表实际上需要一定的时间,如果您有50亿个对象花费一些钱存放。

Simply downloading the list of all your objects will actually take some time and cost some money if you have 50 million objects stored.

另请参见这个线程约StorageObjectCount - 这是在使用数据。

Also see this thread about StorageObjectCount - which is in the usage data.

这是S3 API来获取至少是基本,即使是小时的时候,将是巨大的。

An S3 API to get at least the basics, even if it was hours old, would be great.

这篇关于我怎么知道有多少对象,我存储在S3存储桶?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆