Question

I'd like to know if there's a way for me to have bucket-level stats in amazon s3. Basically i want to charge customers for storage and GET requests on my system (which is hosted on s3).

So i created a specific bucket for each client, but i can't seem to get the stats just for a specific bucket.

I see the API lets me

GET Bucket

or

GET Bucket requestPayment 

But i just can't find how to get the number of requests issued to said bucket and the total size of the bucket.

Thanks for help !

Regards

Was it helpful?

Solution

I don't think that what you are trying to achieve is possible using Amazon API. The GET Bucket request does not contain usage statistics (requests, etc) other than the timestamp of the latest modification (LastModified).

My suggestion would be that you enable logging in your buckets and perform the analysis that you want from there.

S3 starting page gives you an overview on it:

Amazon S3 also supports logging of requests made against your Amazon S3 resources. You can configure your Amazon S3 bucket to create access log records for the requests made against it. These server access logs capture all requests made against a bucket or the objects in it and can be used for auditing purposes.

And I am sure there is plenty of documentation on that matter.
HTH.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top