S3 CloudWatch Metrics
Welcome to CloudAffaire and this is Debjeet
In the last blog post, we have discussed inventory in S3.
In this blog post, we are going to discuss S3 CloudWatch Metrics.
S3 CloudWatch Metrics
AWS S3 provides CloudWatch metrics to effectively monitor your S3 bucket. Metrics help you to understand the usage and performance of your bucket. S3 provides three types of metrics for your bucket
- Storage Metrics (Free)
- Request Metrics (Paid)
Data Transfer Metrics (Paid)
When you create an S3 bucket, AWS S3 enables storage metrics for your bucket. You can use storage metrics to track the total size and object count for your bucket. Storage metrics are collected at an interval of 24 hours and with no additional charges.
Request metrics can be used to monitor requests to your bucket. The metrics are available at 1-minute intervals and are kept for 15 months duration. Request metrics can be used to track your S3 bucket usage in a more granular way. Additional charges apply for request metrics.
Data Transfer Metrics:
Data Transfer metrics can be used to monitor the performance of your bucket. Like request metrics, data transfer metrics are also available at 1-minute intervals and associate additional cost.
Note: Data transfer metrics also comes under request metrics and is enabled when you enable request metrics.
Next, we are going to view the storage metrics of an S3 bucket.
Prerequisite for this demo
An S3 bucket with objects with more than 1 day age.
Step 1: Login to AWS console and click ‘S3’ located under Storage.
Step 2: Click on the bucket.
Note: Storage metrics collect data at an interval of 1 day. We had already created this bucket and objects inside it in advance (minimum 1 day in advance).
Warning: Additional charges apply for creating objects in S3 bucket.
Step 3: Navigate to ‘Metrics’ located under ‘Management’ and click ‘Storage’.
Note: Storage Metrics provides BucketSizeBytes and NumberOfObjects metrics to monitor your bucket usage in 1-day interval. The total size of all the objects in our bucket is 189 bytes and there are 5 objects stored inside it.
You can enable request metrics for your bucket by clicking on the edit sign beside your bucket name. We are going to cover request metrics in our CloudWatch blog series.
For more details on request metrics, please follow AWS S3 documentation
To stop acquiring any cost, delete the buckets once the demo is completed.
Hope you have enjoyed this article, in the next blog post, we are going to discuss Bucket Policy in S3.