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
After adding a filter for a bucket it looks like this
Main goal is to get the request metrics using the GetMetricsData with a metrics query
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.
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