Amazon S3 Storage Lens delivers organization-wide visibility into object storage usage and activity trends, and makes actionable recommendations to improve cost-efficiency and apply data protection best practices. S3 Storage Lens is a cloud storage analytics solution that provides a single view of object storage usage and activity across hundreds, or even thousands, of accounts in an AWS Organization, with drill-downs to generate insights at the account, bucket, or even prefix level.
Amazon S3 is used to store large shared datasets across tens to hundreds of accounts and buckets, multiple Regions, and thousands of prefixes. With S3 Storage Lens, you can easily understand, analyze, and optimize storage with interactive dashboards to aggregate data for your entire organization, specific accounts, Regions, or buckets. S3 Storage Lens delivers more than 30 individual metrics on S3 storage usage and activity for all accounts in your organization. These metrics are available in the S3 console to visualize storage usage and activity trends in a dashboard, with contextual recommendations that make it easy to take immediate action.
S3 Storage Lens can be used to see a summary of your insights, detect outliers, enhance your data protection, and optimize your storage costs.
What you will accomplish
- Understand the difference between free and advanced metrics
- Create, configure, and navigate an S3 Storage Lens dashboard
- Explore three use cases for S3 Storage Lens
Access this support page for more information on how to create and activate a new AWS account.
For help creating your first S3 bucket, visit the Amazon S3 User Guide.
S3 Storage Lens offers 15 free metrics, relevant to your storage usage, for all dashboards and configurations. Usage metrics describe the size, quantity, and characteristics of your storage. This includes the total bytes stored, object count, and average object size. All metrics are collected daily and data is available for 14 days. For more information about what usage metrics are aggregated by S3 Storage Lens, see the Amazon S3 Storage Lens metrics glossary.
Advanced metrics and recommendations
S3 Storage Lens offers free metrics for all dashboards and configurations with the option to upgrade to advanced metrics and recommendations for an additional charge. For more information, see the Management & analytics tab on the Amazon S3 pricing page.
Advanced metrics and recommendations contain 29 usage and activity metrics and include the following features:
- Activity metrics - S3 Storage Lens aggregates activity metrics that describe the details of how often your storage is requested. This includes the number of requests by type, upload and download bytes, and errors.
- Amazon CloudWatch publishing - Publish S3 Storage Lens usage and activity metrics to CloudWatch to create a unified view of your operational health in CloudWatch dashboards. You can also use CloudWatch APIs and features like alarms and triggered actions, metric math, and anomaly detection to monitor and take action on S3 Storage Lens metrics. For more information, see Monitor S3 Storage Lens metrics in CloudWatch.
- Prefix aggregation - Collect usage metrics at the prefix level. Prefix level metrics are not published to CloudWatch.
S3 Storage Lens provides automated recommendations to help you optimize your storage. Recommendations are placed contextually alongside relevant metrics in the S3 Storage Lens dashboard. Historical data is not eligible for recommendations because recommendations are relevant to what is happening in the most recent period. Recommendations only appear when they are relevant.
S3 Storage Lens recommendations come in the following forms:
Suggestions alert you to trends within your storage usage and activity that might indicate an opportunity to optimize your storage cost or apply data protection best practice.
Call-outs are recommendations that alert you to interesting anomalies within your storage usage and activity over a period that might need further attention or monitoring.
Reminders provide insights into how Amazon S3 works. They can help you learn more about ways to use S3 features to reduce storage costs or apply data protection best practices.
S3 Storage Lens collects metrics daily, and data is available for queries for 15 months. For more information about the storage metrics aggregated by S3 Storage Lens, see the Amazon S3 Storage Lens metrics glossary.
1.1 — Sign in to the AWS Management Console using your account credentials. From the AWS console services search bar, enter S3. Under the services search results, select S3.
1.2 — Navigate to the Dashboards menu item under the Storage Lens section on the left panel. Next, choose Create dashboard.
1.3 — Under the General panel, enter a descriptive name for your dashboard and choose a Home Region. Next, choose the Enable option under Status for updated daily metrics.
1.4 — A dashboard can analyze storage across accounts, Regions, buckets, and prefix. Under Dashboard scope, choose whether you would like to include or exclude certain Regions, buckets, or both to change the scope of your dashboard.
If you select the Include Regions and buckets button, you will have the option to include all Regions and buckets, or select which Regions and buckets you would like to include from a dropdown. Otherwise, if you select the Exclude Regions and buckets button, you will have a dropdown option to choose which Regions and buckets to exclude.
1.6 — Under Metrics export, you may choose Enable to have your dashboard metrics exported to a specified S3 bucket every 24 hours.
If you choose to enable this, you will then have to select your preferred output format and your destination bucket.
To learn more, see the documentation on S3 Storage Lens data export.
During this time, feel free to leave and come back to this tutorial once the metrics have been generated.
2.1 — Navigate back to the dashboard by accessing the Amazon S3 console, and then go to the Dashboards menu item, as you did in Step 1.2. Once you open the dashboard, you may expand the Filters panel to temporarily filter the dashboard data by Accounts, Regions, Storage classes, Buckets, and Prefixes.
2.2 — The next section is a snapshot of a variety of metrics. You can see a trend line that shows the trend of each metric over the last 30 days, if using advanced metrics, and a percentage change (14 days if using free metrics or if you enabled advanced metrics less than 30 days ago). The number in the % change comparison column shows the Day/day percentage change by default. You may select to compare by Week/week or Month/month.
Moreover, you may toggle between different metric groups by selecting Summary, Cost efficiency, Data protection, or Activity.
2.3 — Under the Snapshot panel, you will see the Trends and distributions section. In this section, you can compare two metrics over a date range, which you can specify, to view trends over time.
2.4 — Right below, the dashboard also shows those two metrics and how they are distributed across Storage class and AWS Regions. You can click on any value in this graph and Drill down to filter the entire dashboard on that value, or select Analyze by to navigate to a new dashboard view for that dimension.
2.5 — The last section on the Overview tab allows you to perform a Top N analysis of a metric over a date range, where N is between 1 and 25. In the example below, we have selected the top three items in descending order for the Total storage metric.
You can then see the top three accounts, Regions, buckets, and prefixes given the chosen metric, along with the associated trends.You can view the other tabs on the dashboard for more specific metrics on your Accounts, Regions, Storage classes, Buckets, and Prefixes.
3.1 — At the top of the S3 Storage Lens dashboard, navigate to the Bucket tab.
3.3 — On the Trend of buckets graph, you can visualize not only which bucket has the highest total storage, but also which buckets have had the most growth. On this graph, it is clear that bucket1 has had consistent growth while also having the largest storage.
We can drill down on this bucket to gather more insights, such as the average object size, percentage of noncurrent version bytes, or the largest prefixes.
3.4 — Then, you can navigate to the bucket within the Amazon S3 console to understand the associated workload and identify internal owners of the bucket based on the account number. You can then find out from the bucket owners whether this growth is expected, or if it is unexpected growth that you can now place under proper monitoring and control.
Increase use of S3 storage classes
One of the clearest paths to storage cost savings is through optimizing your storage costs based on frequency of access and performance needs via Amazon S3 Storage Classes. Amazon S3 offers a range of storage classes that you can choose from based on the data access, resiliency, and cost requirements of your workloads. These storage classes include:
- S3 Standard for general-purpose storage of frequently accessed data
- S3 Intelligent-Tiering for data with unknown or changing access patterns
- S3 Standard-Infrequent Access (S3 Standard-IA) and S3 One Zone-Infrequent Access (S3 One Zone-IA) for long-lived, but less frequently accessed data
- Amazon S3 Glacier Flexible Retrieval, Amazon S3 Glacier Instant Retrieval, and Amazon S3 Glacier Deep Archive for long-term archive and digital preservation
If you see that all, or nearly all, of your storage bytes are in the S3 Standard storage class, it means that you may be able to optimize your usage by exploring additional S3 storage classes to best align to your use case. If you see a view like this, you can likely benefit from exploring cost optimization design patterns.
First, you can have cost optimization automated for you by using the S3 Intelligent-Tiering storage class, which is ideal for unknown or changing access patterns. Second, for known access patterns, you can configure Amazon S3 lifecycle policies to reduce your storage costs by transitioning your data to more cost-effective storage classes as the access frequency slows over time. View the Amazon S3 pricing page for more details on exact savings, and note additional costs for transitions and using S3 Glacier storage classes per object overhead.
You can then continue your analysis in S3 Storage Lens to explore storage class usage at greater depths, drilling down to see storage class distributions for specific Regions or buckets (or prefixes if you have upgraded to the advanced tier). It is common to have a subset of buckets that are not optimally configured, which is where you can benefit from using different or additional S3 storage classes. S3 Storage Lens is an effective tool to screen for these buckets before moving on to take further action.
Uncover buckets that have gone cold
If you have buckets that have gone cold, meaning that the storage in those buckets is no longer accessed (or rarely accessed), it is often an indicator that the related workload is no longer in use. If you have enabled S3 Storage Lens advanced metrics, you have access to activity metrics to understand how hot (or cold) your buckets are. There are metrics like GET requests and download bytes that indicate how often your buckets are accessed each day. You can trend this data over several months (extended data retention is available with the advanced tier) to understand the consistency of the access patterns and to spot buckets that are no longer being accessed. The % retrieval rate metric, computed as Download bytes / Total storage, is a useful metric to understand the proportion of storage in a bucket that is accessed daily. Keep in mind that the download bytes are duplicated in cases where the same object is downloaded multiple times during the day.
The best way to visualize buckets that have gone cold is through the Bubble analysis graph on the Bucket tab of the dashboard. The bubble analysis graph enables you to plot your buckets on multiple dimensions using any three metrics to represent the x-axis, y-axis, and size of the bubble.
3.6 — Navigate to the Bucket tab and down to the Bubble analysis graph. Select Total storage, % retrieval rate, and Avg. object size.
If you drill-down on any buckets with a retrieval rate of zero (or near zero) and a larger relative storage size, you can find buckets that have gone cold and where the storage cost is likely large enough to warrant taking action. For this example, we would look at bucket10 and bucket1.
From here, you can identify the bucket owners in your organization to confirm the purpose of the workload and find out if the storage is still needed. If it’s not needed, you can remediate costs by configuring lifecycle expiration policies, or by archiving the data in the Amazon S3 Glacier storage classes. And to avoid the problem of cold buckets in the future, you can apply one of the recommended design patterns previously mentioned in this guide, to automatically transition your data using S3 lifecycle policies or enable auto-archiving with S3 Intelligent-Tiering.
4.2 — Choose the Edit button on the top right of the dashboard configuration page.
4.3 — Scroll down to the metrics selection panel, and choose Free metrics. Next, select Save changes.