Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not able to get request metrics for AWS S3

I tried to retrieve request metrics for S3 buckets but couldn't access them through the "All metrics" query. However, after creating a bucket-specific filter, I managed to view the dashboard with metrics like AllRequest and GetRequest. Is there a method to apply these changes universally to obtain request metrics for all buckets associated with an account?

Currently the cloudwatch > s3 dashboard looks like this enter image description here

After adding a filter for a bucket it looks like this enter image description here

Main goal is to get the request metrics using the GetMetricsData with a metrics query

like image 381
Sridip Dutta Avatar asked Sep 18 '25 14:09

Sridip Dutta


1 Answers

The storage metrics are enabled by default to all customers, and they are reported once per day for all s3 buckets at no additional cost. However, the request metrics are not enabled by default since they incur charges at the same rate as Amazon CloudWatch custom metrics. As request metrics involve costs, you have to explicitly enable them on your S3 buckets. Thus, there is no universal flag currently to enable this request metrics feature for you on all s3 buckets.

You also mentioned that you were able to view the request metrics after applying the filter. it's important to note that the filter serves a dual purpose - it not only filters the data but also enables the request metrics for your bucket. Based on the provided image, it appears that you created the filter to view request metrics for the entire bucket. However, you can also limit the filter scope using custom filter types such as Prefix, Object tags, and Access points.

Reference: S3 Cloudwatch Metrics.

like image 117
codeninja.sj Avatar answered Sep 20 '25 05:09

codeninja.sj