views:

19

answers:

1

I've got a number of S3 objects that are available to my customers. Since I'd like to bill my customers by usage, I wondered if there is any smart kind of way to get the number of times a given file has been downloaded?

Alternatively, I suppose I could parse the log files provided by S3, but with 10m+ fetches per customer this might be bit of a task.

Any ideas?

A: 

You could redirect through a script on your site that increments a count before redirecting to the S3 URL.

Amber
That wouldn't be an option since the reason I'm using S3 is to avoid passing stuff through my server.
phidah
Well, if it's a header-based redirect, your server won't actually be serving the data of content... but since you mention 10m+ fetches, I'm guessing you might also want to avoid the request load in the first place, which is understandable.
Amber
Indeed. The average file size is ~10kb.
phidah
Parsing the log files is probably the most straightforward way then.
Amber