Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon S3 Programmatically Access Usage Data

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?

like image 631
Chris W. Avatar asked Sep 04 '11 22:09

Chris W.


Video Answer


1 Answers

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

like image 163
cloudberryman Avatar answered Oct 20 '22 09:10

cloudberryman