Skip to content

Checking your S3 usage statistics

In order to get a current view of the storage consumed in this service, the S3 endpoint has a "usage" REST call in the API.

If you want to call it from your S3 framework, the call is documented here:

but there is an alternative where you can inform aws-cli about the API call and get a new functions usable from the CLI tool.

The installation of these extras is documented here:

and assumes an already installed and configured aws-cli.

After adding the json-file that describes the extension, you can call aws like this: (with correct endpoint and profile-name for your configuration)

aws --endpoint-url --profile ceph-sto2 s3api get-usage-stats
    "Summary": {
        "TotalBytes": 164595434499,
        "TotalBytesRounded": 164614451200,
        "TotalEntries": 10333