如何通过aws-sdk(JavaScript或节点)获取s3存储桶大小 [英] how to get s3 bucket size via aws-sdk (javascript or node)

查看:100
本文介绍了如何通过aws-sdk(JavaScript或节点)获取s3存储桶大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用javascript/nodejs aws-sdk查找/获取s3存储桶信息,但没有找到此类api.如何通过aws-sdk(javascript或节点)api获取s3存储桶大小/信息.

I tried to find/get s3 bucket information using javascript/nodejs aws-sdk, but I didnt find such apis. How to get s3 bucket size / information via aws-sdk (javascript or node) api.

推荐答案

除了枚举所有对象外,没有任何API可以获取存储桶大小.

There is no API to get the bucket size other than enumerating all the objects.

一种替代方法是调查帐单,但是我认为,这只会产生不准确的数据,因为帐单在特定时间内处理了特定大小.

One alternative approach would be to investigate the billing, but I think that will only yield inaccurate data as the billing handles a specific size over a specific time.

这篇关于如何通过aws-sdk(JavaScript或节点)获取s3存储桶大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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