AWS S3 Storage Lens gives visibility into object storage usage, activity trends. It gives recommendations to improve cost-efficiency, also it applies data protection best practices. It is the first analytics service that provides a  single view of object storage usage and activity across hundreds and thousands of accounts in an organization.  It provides a summary of insights of S3 Buckets, detects outliers, enhances data protection, and optimizes storage costs.

S3 Storage comes up with a dashboard containing pre-configured views to visualize storage usage and activity trends. We can also export metrics in CSV or Parquet format to an S3 bucket.

In this article, we will see the existing default dashboard and metrics it has. We will also create a new dashboard with free metrics in it.

Pre-requisites

  1. AWS Account (Create if you don’t have one).
  2. Basic understanding of S3(Click here to learn about S3)
  3. A non-root IAM User with “S3StorageLensServiceRolePolicy”  policy attached to it(click here to learn to create an IAM user).

What will we do?

  1. Login to AWS.
  2. Look at S3 through a default Storage Lens dashboard.
  3. Create a new dashboard.

Login to AWS

Click here to go to the Login Page. Use a non-root user to log into the account. If you use a root user, you will face issues accessing the Storage Lens service.

How to use S3 Storage Lens to view storage usage and activity metrics of S3 Bucket on AWS linux

Once you successfully login into your AWS account you will see the main console as follows.

How to use S3 Storage Lens to view storage usage and activity metrics of S3 Bucket on AWS linux

Look at S3 through a default Storage Lens dashboard

Storage Lens service comes under S3. Click on “Services” on the left top of the screen and search for “S3”.

How to use S3 Storage Lens to view storage usage and activity metrics of S3 Bucket on AWS linux

Here is the main dashboard of your S3 where you can see all the buckets available in your account.

How to use S3 Storage Lens to view storage usage and activity metrics of S3 Bucket on AWS linux

In the left panel click on “Dashboards” under “Storage Lens” to go to the Storage Lens dashboard.

How to use S3 Storage Lens to view storage usage and activity metrics of S3 Bucket on AWS linux

Now, if you tried to access the dashboard using a root-user, you will get an error as follows.

How to use S3 Storage Lens to view storage usage and activity metrics of S3 Bucket on AWS linux

As mentioned previously, we need to use a non-root user.

To learn to create an IAM user, click here. Once you are ready with a non-root user, use it to log back to the account.

Here you can see that now I am logged in using a non-root user who has the necessary permissions for performing operations. Earlier I was logged in using a root user.

Once you log back to the account using a non-root user, you can see the existing default dashboard. The default dashboard is preconfigured by AWS Amazon S3 to help us visualize summarized insights and trends for all our account’s aggregated storage usage and activity metrics on the console.

How to use S3 Storage Lens to view storage usage and activity metrics of S3 Bucket on AWS linux

If you have multiple accounts under your organization you can see Trends of your buckets.

How to use S3 Storage Lens to view storage usage and activity metrics of S3 Bucket on AWS linux

You will see trends of your Buckets from different regions.

How to use S3 Storage Lens to view storage usage and activity metrics of S3 Bucket on AWS linux

Under the storage class tab, you will see trends for the Bucket as per the Storage Class of your buckets.Advertisement

How to use S3 Storage Lens to view storage usage and activity metrics of S3 Bucket on AWS linux

Under the Bucket tab, you will see trends as per the bucket names.

How to use S3 Storage Lens to view storage usage and activity metrics of S3 Bucket on AWS linux

Create a new dashboard

Click on the dashboard in the left panel to go to the console of Storage Lens service.

To create a new S3 Storage Lens dashboard, click on the “Create dashboard” button.

How to use S3 Storage Lens to view storage usage and activity metrics of S3 Bucket on AWS linux

Specify a name for your dashboard and the region in which this dashboard needs to be created. If you want you can even disable the dashboard so that it doesn’t display updated daily metrics.  Add tags to your dashboard though this is an optional step.

How to use S3 Storage Lens to view storage usage and activity metrics of S3 Bucket on AWS linux

While creating a dashboard you can include regions and buckets or you can exclude regions and buckets. Here I have selected “Exclude regions and buckets” — > “Exclude Regions” and selected 2 regions to exclude. By excluding these 2 regions, buckets from these two regions will not be monitored by the dashboard.

How to use S3 Storage Lens to view storage usage and activity metrics of S3 Bucket on AWS linux

You can choose “Free metrics” or “Advanced matrix” for your dashboard.

Click on “Create dashboard” to create your first dashboard in the S3 storage Lens service.

How to use S3 Storage Lens to view storage usage and activity metrics of S3 Bucket on AWS linux

Here you can see that the dashboard has been created and the status of it is enabled.

How to use S3 Storage Lens to view storage usage and activity metrics of S3 Bucket on AWS linux

When you create a new dashboard it at least takes 48 hours to reflect data into it. Since we just created the dashboard that there will be no data available in it.

If you don’t want this dashboard you can delete it or disable it. To delete the dashboard click on the “Delete” button

How to use S3 Storage Lens to view storage usage and activity metrics of S3 Bucket on AWS linux

Confirm your deletion action by entering the dashboard name in the text field, and click on the “Delete” button.

How to use S3 Storage Lens to view storage usage and activity metrics of S3 Bucket on AWS linux

Conclusion

In this article, we saw the default dashboard and different options available in it to analyze the S3 buckets and check activity trends. We also saw the steps to create a new dashboard with free metrics.