I want to use Amazon S3 Storage Lens dashboards to view prefix-level daily usage metrics for my Amazon Simple Storage Service (Amazon S3) buckets.
To view the daily usage metrics at the prefix level, activate the Amazon S3 advanced metrics and recommendations feature on the S3 Storage Lens dashboard. The dashboard includes the following metrics:
- Storage metrics, such as total storage and object count
- Cost optimization metrics, such as noncurrent version object count and delete marker object count
To view prefix-level metrics, activate the Prefix aggregation option.
Note: S3 Storage Lens doesn't publish prefix-level activity metrics.
Create an Amazon S3 Storage Lens dashboard with Advanced metrics and Prefix aggregation options activated
- Open the Amazon S3 console.
- In the navigation pane, under S3 Storage Lens, choose Dashboards.
- Choose Create dashboard.
- On the Dashboard page, in the General section, enter a name for the dashboard.
- Under Metrics selection, choose Advanced metrics and recommendations.
- Under Advanced metrics and recommendations features, choose Prefix aggregation.
- Under Prefix aggregation, configure the following:
- Choose the minimum prefix threshold size for this dashboard. For example, a prefix threshold of five percent indicates that prefixes that make up five percent or more of the bucket's total storage size are aggregated. The minimum prefix threshold size is one percent.
- Choose the prefix depth. This setting indicates the maximum number of levels that the prefixes are evaluated at. The prefix depth must be less than 10.
- Enter a prefix delimiter character to identify each prefix level. The default value in Amazon S3 is the / character, but your storage structure might use other delimiter characters.
- Choose Create dashboard.
After you create the dashboard, it takes up to 48 hours to start publishing the metrics.
View the prefix-level metrics on the dashboard
- In the Dashboard list, select the dashboard that you created in step 1.
- Choose the Prefix tab. By default, the dashboard shows metrics for top 10 prefixes. You can increase this number up to 50.
- Scroll to the Prefixes section to view usage metrics for the Top N prefixes. From the Metrics categories dropdown list, choose Summary and Cost optimization.
- You can determine the size of listed prefixes from the Total storage and Object count metrics.
To view the prefix-level metrics for a particular S3 bucket or prefix, complete the following steps:
- On the dashboard page in Storage Lens, choose Filters. By default, Accounts, AWS Regions, Storage classes, Buckets, and Prefixes are selected for your dashboard.
- To filter to a specific S3 bucket or prefix, clear Select all. Then from the dropdown list, choose the options to filter.
- Choose Apply.
Note: To see data for a specific metric, choose the metric from the Metric dropdown list in any section in the S3 Storage Lens dashboard.
Creating and updating Amazon S3 Storage Lens dashboards