

# Monitoring metrics with Amazon CloudWatch
Monitoring metrics with Amazon CloudWatch

You can use Amazon CloudWatch metrics to track performance, detect anomalies, and monitor the operational health of tables. There are several sets of CloudWatch metrics that you can use with S3 Tables.

**Daily storage metrics for tables and table buckets**  
Monitor the amount of data stored in tables and table buckets, including total size in bytes and number of files. These metrics track total storage bytes per access tier and file counts at the table bucket, table, and namespace level. Storage metrics for S3 Tables are reported once per day and are provided to all customers at no additional cost.

**Table maintenance metrics**  
Monitor automated maintenance operations performed by Amazon S3 on your tables, such as compaction. These metrics track the number of bytes and files processed during maintenance activities. Maintenance metrics for S3 Tables are reported once per day and are provided to all customers at no additional cost.

**Request metrics**  
Monitor S3 Tables requests to quickly identify and act on operational issues. These CloudWatch metrics can be optionally enabled for individual table buckets. Request metrics for S3 Tables are reported once every minute and are billed at the same rate as CloudWatch custom metrics. Request metrics include:  
+ counts of data plane operations (GET, PUT, HEAD, POST)
+ bytes transferred
+ latency measurements
+ error rates

**Note**  
**Best-effort CloudWatch metrics delivery**  
CloudWatch metrics are delivered on a best-effort basis. Most requests for an Amazon S3 object that have request metrics result in a data point being sent to CloudWatch.  
The completeness and timeliness of metrics are not guaranteed. The data point for a particular request might be returned with a timestamp that is later than when the request was actually processed. The data point for a minute might be delayed before being available through CloudWatch, or it might not be delivered at all. CloudWatch request metrics give you an idea of the nature of traffic against your bucket in near-real time. It is not meant to be a complete accounting of all requests. It follows from the best-effort nature of this feature that the reports available at the Billing & Cost Management Dashboard might include one or more access requests that do not appear in the bucket metrics.

# Metrics and dimensions
Metrics and dimensions

The storage metrics and dimensions that S3 Tables sends to Amazon CloudWatch are listed in the following tables.

**Note**  
**Best-effort CloudWatch metrics delivery**  
CloudWatch metrics are delivered on a best-effort basis. Most requests for an Amazon S3 object that have request metrics result in a data point being sent to CloudWatch.  
The completeness and timeliness of metrics are not guaranteed. The data point for a particular request might be returned with a timestamp that is later than when the request was actually processed. The data point for a minute might be delayed before being available through CloudWatch, or it might not be delivered at all. CloudWatch request metrics give you an idea of the nature of traffic against your bucket in near-real time. It is not meant to be a complete accounting of all requests. It follows from the best-effort nature of this feature that the reports available at the Billing & Cost Management Dashboard might include one or more access requests that do not appear in the bucket metrics.

## Daily storage metrics for table buckets in CloudWatch


The `AWS/S3/Tables` namespace includes the following daily storage metrics which are available at no additional cost. You can filter these metrics by table bucket, table, or namespace name.


**Daily storage metrics**  

| Metric Name | Description | Units | Statistics | Granularity | 
| --- | --- | --- | --- | --- | 
| Total Bucket Storage | The amount of storage in bytes used by all tables in a table bucket | Bytes | Sum | Daily | 
| Total number of files | The total count of all files stored in a table bucket | Count | Sum | Daily | 

## Table maintenance metrics


The `AWS/S3/Tables` namespace includes the following table maintenance metrics which are available at no additional cost. You can filter these metrics by table bucket, table, or namespace name.


**Table maintenance metrics**  

| Metric Name | Description | Units | Statistics | Granularity | 
| --- | --- | --- | --- | --- | 
| CompactionBytesProcessed | The number of bytes processed during table compaction operations | Bytes | Sum | Daily | 
| CompactionObjectsCount | The number of objects processed during table compaction operations | Count | Sum | Daily | 

## Request metrics for tables and table buckets in CloudWatch


The `AWS/S3/Tables` namespace includes the following request metrics which are billed at the same rate as CloudWatch custom metrics. You can filter these metrics by table bucket, table, or namespace name.


**Request metrics**  

| Metric Name | Description | Units | Statistics | Granularity | 
| --- | --- | --- | --- | --- | 
| All requests count | The total number of HTTP requests made to a table bucket | Count | Sum | 1-minute | 
| Get requests count | The number of HTTP GET requests made to retrieve objects from tables | Count | Sum | 1-minute | 
| Put requests count | The number of HTTP PUT requests made to add objects to tables | Count | Sum | 1-minute | 
| Head requests count | The number of HTTP HEAD requests made to retrieve metadata from tables | Count | Sum | 1-minute | 
| Post requests counts | The number of HTTP POST requests made to tables | Count | Sum | 1-minute | 
| UpdateTableMetadataLocation requests count | The number of requests made to update table metadata locations | Count | Sum | 1-minute | 
| GetTableMetadataLocation requests count | The number of requests made to retrieve table metadata locations | Count | Sum | 1-minute | 
| BytesDownloaded | The number of bytes downloaded for table requests | Bytes | Sum | 1-minute | 
| BytesUploaded | The number of bytes uploaded for table requests | Bytes | Sum | 1-minute | 
| 4xxErrors | The count of HTTP 4xx client error status codes returned | Count | Sum | 1-minute | 
| 5xxErrors | The count of HTTP 5xx server error status codes returned | Count | Sum | 1-minute | 
| FirstByteLatency | The per-request time from the complete request being received to when the response starts being returned | Milliseconds | Sum | 1-minute | 
| TotalRequestLatency | The elapsed per-request time from the first byte received to the last byte sent | Milliseconds | Sum | 1-minute | 

## S3 Tables dimensions in CloudWatch


The following dimensions are used to filter S3 Tables metrics.


**S3 Tables dimensions**  

| Dimension Name | Description | Example Value | 
| --- | --- | --- | 
| TableBucketName | The name of the Amazon S3 table bucket | my-table-bucket | 
| Namespace | The namespace within the table bucket that contains one or more tables | my-department | 
| TableName | The name of a specific table within a namespace | transactions | 

# Accessing CloudWatch metrics
Accessing CloudWatch metrics

You can monitor S3 Tables metrics using the CloudWatch Console, the AWS CLI, or the CloudWatch API. This section explains how to access your metrics using these different methods.

## Using the S3 console


1. Sign in to the AWS Management Console and open the Amazon S3 console at [https://console.aws.amazon.com/s3/](https://console.aws.amazon.com/s3/).

1. In the left navigation pane, choose **Table buckets**.

1. In the buckets list, choose the name of the bucket that contains the tables you want to see metrics for.

1. Choose the **Metrics** tab.

1. Choose the **View in CloudWatch** in any metrics pane to navigate to the CloudWatch console and see your available metrics in the `AWS/S3/Tables` namespace.

## Using the AWS CLI


To list metrics for S3 Tables using the AWS CLI, use the `list-metrics` command with the `--namespace` parameter set to `AWS/S3/Tables`:

```
aws cloudwatch list-metrics --namespace AWS/S3/Tables
```

To get statistics for a specific S3 Tables metric, use the `get-metric-statistics` command. For example:

```
aws cloudwatch get-metric-statistics \
--namespace AWS/S3/Tables \
--metric-name TotalBucketStorage \
--dimensions Name=TableBucketName,Value=MyTableBucket \
--start-time 2025-03-01T00:00:00 \
--end-time 2025-03-02T00:00:00 \
--period 86400 \
--statistics Average
```

## Best Practices

+ When retrieving metrics, set the Period value based on the metric's granularity. For daily metrics (like storage metrics), use 86400 seconds (24 hours). For minute-level metrics (like request metrics), use 60 seconds.
+ Use dimensions appropriately to filter metrics to the desired scope (table bucket, namespace, or individual table level).
+ Consider using metric math to create derived metrics that better match your monitoring needs.

## Related Resources

+ [Amazon CloudWatch Concepts](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html)
+ [Using Amazon CloudWatch Dashboards](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Dashboards.html)

# Managing CloudWatch metrics
Managing CloudWatch metrics

Storage metrics are enabled by default for all Amazon S3 tables and table buckets. You can enable or disable additional Request metrics through the console, AWS Command Line Interface (AWS CLI), or AWS SDKs.

## Prerequisites

+ Requires `s3table:PutTableBucketMetricsConfiguration` IAM permission

**Note**  
S3 Tables Request metrics are billed at the same rate as CloudWatch custom metrics.

## Using the AWS Management Console


To enable or disable additional metrics

1. Sign in to the AWS Management Console and open the Amazon S3 console at [https://console.aws.amazon.com/s3/](https://console.aws.amazon.com/s3/).

1. In the left navigation pane, choose **Table buckets**.

1. In the buckets list, choose the name of the table bucket that contains the tables you want to request metrics for.

1. Choose the **Metrics** tab.

1. From the Request metrics panel, choose **Edit**.

1. Select **Enabled** or **Disabled**, then **Save changes**.

## Using the AWS CLI


These examples show how to enable or disable request metrics for table buckets by using the AWS CLI. To use these commands, replace the *user input placeholders* with your own information.

**Example : To enable request metrics for a table bucket:**  

```
aws s3tables put-table-bucket-metrics-configuration \
--table-bucket-arn arn:aws:s3tables:us-east-1:111122223333:bucket/amzn-s3-demo-table-bucket
```

**Example : To disable request metrics for a table bucket:**  

```
aws s3tables delete-table-bucket-metrics-configuration \
--table-bucket-arn arn:aws:s3tables:us-east-1:111122223333:bucket/amzn-s3-demo-table-bucket
```