10. September 2017 14:04
by Aaron Medacco

Tracking Request Counts of Your S3 Objects

10. September 2017 14:04 by Aaron Medacco | 0 Comments

There are cases where you might be interested in knowing how many times your content hosted in S3 is requested by end users. Maybe you want to determine what content you serve is most popular or just want to have more metrics available for an application that heavily relies on S3 storage. Your knee-jerk reaction when trying to find this kind of information should be to look within CloudWatch under the S3 metrics. However, you might be surprised to find there's nothing there, as this is something you need to enable.

 S3 Request Metrics

Additionally, there is a charge for enabling these metrics which is identical to that of custom CloudWatch metrics. CloudWatch costs are pretty cheap, but you can review them here.

Amazon has provided documentation on how to accomplish this in their documentation

Keep in mind that these metrics are what Amazon defines as "best-effort":

"The completeness and timeliness of metrics is not guaranteed. The data point for a particular request might be returned with a timestamp that is later than when the request was actually processed, or the data point for a minute might be delayed before being available through CloudWatch, or it might not be delivered at all. CloudWatch request metrics give you an idea of the nature of traffic against your bucket in near real time. It is not meant to be a complete accounting of all requests."


Copyright © 2016-2017 Aaron Medacco