Using S3 Storage Lens metrics to improve performance - Amazon Simple Storage Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

Using S3 Storage Lens metrics to improve performance

If you have S3 Storage Lens advanced metrics enabled, you can use detailed status-code metrics to get counts for successful or failed requests. You can use this information to troubleshoot access or performance issues. Detailed status-code metrics show counts for HTTP status codes, such as 403 Forbidden and 503 Service Unavailable. You can examine overall trends for detailed status-code metrics across S3 buckets, accounts, and organizations. Then, you can drill down into bucket-level metrics to identify workloads that are currently accessing these buckets and causing errors.

For example, you can look at the 403 Forbidden error count metric to identify workloads that are accessing buckets without the correct permissions applied. After you've identified these workloads, you can do a deep dive outside of S3 Storage Lens to troubleshoot your 403 Forbidden errors.

This example shows you how to do a trend analysis for the 403 Forbidden error by using the 403 Forbidden error count and the % 403 Forbidden errors metrics. You can use these metrics to identify workloads that are accessing buckets without the correct permissions applied. You can do a similar trend analysis for any of the other Detailed status code metrics. For more information, see Amazon S3 Storage Lens metrics glossary.

Prerequisite

To see Detailed status code metrics in your S3 Storage Lens dashboard, you must enable S3 Storage Lens Advanced metrics and recommendations, and then select Detailed status code metrics. For more information, see Creating and updating Amazon S3 Storage Lens dashboards.

Step 1: Do a trend analysis for an individual HTTP status code

  1. Sign in to the Amazon Web Services Management Console and open the Amazon S3 console at https://console.amazonaws.cn/s3/.

  2. In the left navigation pane, choose Storage Lens, Dashboards.

  3. In the Dashboards list, choose the name of the dashboard that you want to view.

  4. In the Trends and distributions section, for Primary metric, choose 403 Forbidden error count from the Detailed status codes category. For Secondary metric, choose % 403 Forbidden errors.

  5. Scroll down to the Top N overview for date section. For Metrics, choose 403 Forbidden error count or % 403 Forbidden errors from the Detailed status codes category.

    The Top N overview for date section updates to display the top 403 Forbidden error counts by account, Amazon Web Services Region, and bucket.

Step 2: Analyze error counts by bucket

  1. Sign in to the Amazon Web Services Management Console and open the Amazon S3 console at https://console.amazonaws.cn/s3/.

  2. In the left navigation pane, choose Storage Lens, Dashboards.

  3. In the Dashboards list, choose the name of the dashboard that you want to view.

  4. In your Storage Lens dashboard, choose the Bucket tab.

  5. Scroll down to the Buckets section. For Metrics categories, select Detailed status code metrics. Then clear Summary.

    The Buckets list updates to display all the available detailed status code metrics. You can use this information to see which buckets have a large proportion of certain HTTP status codes and which status codes are common across buckets.

  6. To filter the Buckets list to display only specific detailed status-code metrics, choose the preferences icon ( 
                            A screenshot that shows the preferences icon in the S3 Storage Lens
                                dashboard.
                        ).

  7. Clear the toggles for any detailed status-code metrics that you don't want to view in the Buckets list.

  8. (Optional) Under Page size, choose the number of buckets to display in the list.

  9. Choose Confirm.

    The Buckets list displays error count metrics for the number of buckets that you specified. You can use this information to identify specific buckets that are experiencing many errors and troubleshoot errors by bucket.

Step 3: Troubleshoot errors

After you identify buckets with a high proportion of specific HTTP status codes, you can troubleshoot these errors. For more information, see the following: