Is there a way to programmatically access an Amazon S3 account's usage data?
I'm building an application that will charge end-users for their use of my Amazon S3 bucket. Because I'll be the middleman between AWS and the end user for PUT/DELETE operations, I'll be able to keep track of uploads and storage usage, but I'm allowing users to directly access their files with public access links so I won't be able to directly monitor downstream usage.
As such, my plan is to check download usage regularly. Is there anywhere in the AWS API where I can access usage statistics?
There is no way to get usage statistics with the API. This issue is actively discussed on the AWS forum over the years with no feedback from the AWS team.
https://forums.aws.amazon.com/thread.jspa?messageID=277024
The alternatives would be to turn on Amazon S3 server log and to analyze it yourself.
Another option would be to take advantage of Amazon DevPay service.
Thanks Andy
EDIT: Here's the official Amazon S3 documentation related to Amazon S3 access logs: http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?ServerLogs.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With