How do I use the S3 Storage Lens dashboard to view prefix-level metrics for my Amazon S3 bucket?

3 minute read
0

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.

Resolution

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

  1. Open the Amazon S3 console.
  2. In the navigation pane, under S3 Storage Lens, choose Dashboards.
  3. Choose Create dashboard.
  4. On the Dashboard page, in the General section, enter a name for the dashboard.
  5. Under Metrics selection, choose Advanced metrics and recommendations
  6. Under Advanced metrics and recommendations features, choose Prefix aggregation.  
  7. 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.
  8. 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

  1. In the Dashboard list, select the dashboard that you created in step 1.
  2. Choose the Prefix tab. By default, the dashboard shows metrics for top 10 prefixes. You can increase this number up to 50.
  3. 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.
  4. 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:

  1. On the dashboard page in Storage Lens, choose Filters. By default, AccountsAWS RegionsStorage classesBuckets, and Prefixes are selected for your dashboard.
  2. To filter to a specific S3 bucket or prefix, clear Select all. Then from the dropdown list, choose the options to filter.
  3. 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.

Related information

Creating and updating Amazon S3 Storage Lens dashboards

AWS OFFICIAL
AWS OFFICIALUpdated a year ago