

# AWS usage metrics
<a name="CloudWatch-Service-Quota-Integration"></a>

CloudWatch collects metrics that track the usage of some AWS resources and APIs. These metrics are published in the `AWS/Usage` namespace. Usage metrics in CloudWatch allow you to proactively manage usage by visualizing metrics in the CloudWatch console, creating custom dashboards, detecting changes in activity with CloudWatch anomaly detection, and configuring alarms that alert you when usage approaches a threshold.

Some AWS services integrate these usage metrics with Service Quotas. For these services, you can use CloudWatch to manage your account's use of your service quotas. For more information, see [Visualizing your service quotas and setting alarms](CloudWatch-Quotas-Visualize-Alarms.md).

**Topics**
+ [Visualizing your service quotas and setting alarms](CloudWatch-Quotas-Visualize-Alarms.md)
+ [AWS API usage metrics](AWS-API-Usage-Metrics.md)
+ [CloudWatch usage metrics](CloudWatch-Usage-Metrics.md)

# Visualizing your service quotas and setting alarms
<a name="CloudWatch-Quotas-Visualize-Alarms"></a>

For some AWS services, you can use the usage metrics to visualize your current service usage on CloudWatch graphs and dashboards. You can use a CloudWatch metric math function to display the service quotas for those resources on your graphs. You can also configure alarms that alert you when your usage approaches a service quota. For more information about service quotas, see [What Is Service Quotas](https://docs.aws.amazon.com/servicequotas/latest/userguide/intro.html) in the *Service Quotas User Guide*.

If you are signed in to an account that is set up as a monitoring account in CloudWatch cross-account observability, you can use that monitoring account to visualize service quotas and set alarms for metrics in the source accounts that are linked to that monitoring account. For more information, see [CloudWatch cross-account observability](CloudWatch-Unified-Cross-Account.md).

The following services integrate their usage metrics with Service Quotas:
+ AWS CloudHSM
+ [Amazon Chime SDK](https://docs.aws.amazon.com/chime-sdk/latest/dg/usage-metrics.html) 
+ [Amazon CloudWatch](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Usage-Metrics.html)
+ [Amazon CloudWatch Logs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Monitoring-CloudWatch-Metrics.html#CloudWatchLogs-Usage-Metrics)
+ [Amazon DynamoDB](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/metrics-dimensions.html)
+ [Amazon EC2](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/viewing_metrics_with_cloudwatch.html#service-quota-metrics)
+ [Amazon Elastic Container Registry](https://docs.aws.amazon.com/AmazonECR/latest/userguide/monitoring-usage.html)
+ Elastic Load Balancing
+ AWS Fargate
+ [AWS Fault Injection Service](https://docs.aws.amazon.com/fis/latest/userguide/monitoring-cloudwatch.html)
+ [AWS Interactive Video Service](https://docs.aws.amazon.com/ivs/latest/userguide/service-quotas.html#quotas-cloudwatch-integration)
+ AWS Key Management Service
+ [Amazon Data Firehose](https://docs.aws.amazon.com/firehose/latest/dev/monitoring-with-cloudwatch-metrics.html#fh-metrics-usage)
+  [Amazon Location Service](https://docs.aws.amazon.com/location/latest/developerguide/monitoring-using-cloudwatch.html#metrics-exported-to-cloudwatch)
+ [Amazon Managed Blockchain (AMB) Query](https://docs.aws.amazon.com/managed-blockchain/latest/ambq-dg/cw-usage-metrics.html)
+ Amazon SageMaker AI
+ [Multi-party approval](https://docs.aws.amazon.com/mpa/latest/userguide/monitoring-cloudwatch.html)

**To visualize a service quota and optionally set an alarm**

1. Open the CloudWatch console at [https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/).

1. In the navigation pane, choose **Metrics**.

1. On the **All metrics** tab, choose **Usage**, and then choose **By AWS Resource**.

   The list of service quota usage metrics appears.

1. Select the check box next to one of the metrics.

   The graph displays your current usage of that AWS resource.

1. To add your service quota to the graph, do the following:

   1. Choose the **Graphed metrics** tab.

   1. Choose **Math expression**, **Start with an empty expression**. In the new row, under **Details**, enter **SERVICE\$1QUOTA(m1)**.

      A new line is added to the graph, displaying the service quota for the resource represented in the metric.

1. To see your current usage as a percentage of the quota, add a new expression or change the current **SERVICE\$1QUOTA** expression. The new expression to use is **m1/SERVICE\$1QUOTA(m1)\$1100**. 

1. (Optional) To set an alarm that notifies you if you approach the service quota, do the following:

   1. On the row with **m1/SERVICE\$1QUOTA(m1)\$1100**, under **Actions**, choose the alarm icon. It looks like a bell.

      The alarm creation page appears.

   1. Under **Conditions**, ensure that **Threshold type** is **Static** and **Whenever Expression1 is** is set to **Greater**. Under **than**, enter **80**. This creates an alarm that goes into ALARM state when your usage exceeds 80 percent of the quota.

   1. Choose **Next**.

   1. On the next page, select an Amazon SNS topic or create a new one, and then choose **Next**. The topic you select is notified when the alarm goes to ALARM state.

   1. On the next page, enter a name and description for the alarm, and then choose **Next**.

   1. Choose **Create alarm**.

# AWS API usage metrics
<a name="AWS-API-Usage-Metrics"></a>

Most APIs that support AWS CloudTrail logging also report usage metrics to CloudWatch. API usage metrics in CloudWatch allow you to proactively manage API usage by visualizing metrics in the CloudWatch console, creating custom dashboards, detecting changes in activity with CloudWatch anomaly detection, and configuring alarms that alert when usage approaches a threshold.

 You can use the he following table to learn about services that report API usage metrics to CloudWatch. The table lists the values to use for the `Service` dimension, so you can see the usage metrics from that service. You can use the procedure in this section to view the list of a service's APIs that report usage metrics to CloudWatch. 


| Service | Value for the `Service` dimension | 
| --- | --- | 
|  AWS Identity and Access Management Access Analyzer  |  `Access Analyzer`  | 
|  AWS Account Management  |  `Account Management`  | 
|  Alexa for Business  |  `A4B`  | 
|  Amazon API Gateway  |  `API Gateway`  | 
|  AWS App Mesh  |  `App Mesh`  | 
|  AWS AppConfig  |  `AWS AppConfig`  | 
|  Amazon AppFlow  |  `AppFlow`  | 
|  Application Auto Scaling  |  `Application Auto Scaling`  | 
|  Application Discovery Service  |  `Application Discovery Service`  | 
|  Amazon AppStream  |  `AppStream`  | 
|  WorkSpaces Applications Image Builder  |  `Image Builder`  | 
|  Amazon Athena  |  `Athena`  | 
|  AWS Audit Manager  |  `Audit Manager`  | 
|  AWS Backup  |  `Backup`  | 
|  AWS Batch  |  `Batch`  | 
|  Amazon Braket  |  `Braket`  | 
|  AWS Budgets  |  `Budgets`  | 
|  AWS Certificate Manager  |  `Certificate Manager`  | 
|  Amazon Chime SDK  |  `ChimeSDK`  | 
|  Amazon Cloud Directory  |  `Cloud Directory`  | 
|  AWS Cloud Map  |  `Cloud Map`  | 
|  AWS CloudFormation  |  `CloudFormation`  | 
|  AWS CloudHSM  |  `CloudHSM`  | 
|  Amazon CloudSearch  |  `CloudSearch`  | 
|  AWS CloudShell  |  `CloudShell`  | 
|  AWS CloudTrail  |  `CloudTrail`  | 
|  Amazon CloudWatch  |  `CloudWatch`  | 
|  Amazon CloudWatch Application Signals  |  `CloudWatch Application Signals`  | 
|  Amazon CloudWatch Logs  |  `Logs`  | 
|  Amazon CloudWatch Application Insights  |  `CloudWatch Application Insights`  | 
|  AWS CodeBuild  |  `CodeBuild`  | 
|  AWS CodeCommit  |  `CodeCommit`  | 
|  Amazon CodeGuru Profiler  |  `CodeGuru Profiler`  | 
|  AWS CodePipeline  |  `CodePipeline`  | 
|  AWS CodeStar  |  `CodeStar`  | 
|  AWS CodeStar Notifications  |  `CodeStar Notifications`  | 
|  AWS CodeStar Connections  |  `CodeStar Connections`  | 
|  Amazon Cognito Identity pools  |  `Cognito Identity Pools`  | 
|  Amazon Cognito Sync  |  `Cognito Sync`  | 
|  Amazon Comprehend  |  `Comprehend`  | 
|  Amazon Comprehend Medical  |  `Comprehend Medical`  | 
|  AWS Compute Optimizer  |  `ComputeOptimzier`  | 
|  Amazon Connect  |  `Connect`  | 
|  Amazon Connect Customer Profiles  |  `Customer Profiles`  | 
|  AWS Cost and Usage Reports  |  `Cost and Usage Report`  | 
|  AWS Cost Explorer  |  `Cost Explorer`  | 
|  AWS Data Exchange  |  `Data Exchange`  | 
|  AWS Data Lifecycle Manager  |  `Data Lifecycle Manager`  | 
|  AWS Database Migration Service  |  `Database Migration Service`  | 
|  AWS DataSync  |  `DataSync`  | 
|  AWS DeepLens  |  `AWS DeepLens`  | 
|  Amazon Detective  |  `Detective`  | 
|  Device Advisor  |  `Device Advisor`  | 
|  Direct Connect  |  `Direct Connect`  | 
|  AWS Directory Service  |  `Directory Service`  | 
|  DynamoDB Accelerator  |  `DynamoDBAccelerator`  | 
|  Amazon EC2  |  `EC2`  | 
|  EC2 Auto Scaling  |  `EC2 Auto Scaling`  | 
|  Amazon Elastic Container Registry  |  `ECR Public`  | 
|  Amazon Elastic Container Service  |  `ECS`  | 
|  Amazon Elastic File System  |  `EFS`  | 
|  Amazon Elastic Kubernetes Service  |  `EKS`  | 
|  AWS Elastic Beanstalk  |  `Elastic Beanstalk`  | 
|  Amazon Elastic Inference  |  `Elastic Inference`  | 
|  Elastic Load Balancing  |  `Elastic Load Balancing`  | 
|  Amazon EMR  |  `EMR Containers`  | 
|  AWS Firewall Manager  |  `Firewall Manager`  | 
|  Amazon FSx  |  `FSx`  | 
|  Amazon GameLift Servers  |  `GameLift`  | 
|  AWS Glue DataBrew  |  `DataBrew`  | 
|  Amazon Managed Grafana  |  `Grafana`  | 
|  AWS IoT Greengrass  |  `Greengrass`  | 
|  AWS Ground Station  |  `Ground Station`  | 
|  AWS Health APIs And Notifications  |  `AWS Health APIs And Notifications`  | 
|  Amazon Interactive Video Service  |  `IVS`  | 
|  AWS IoT Core  |  `IoT`  | 
|  AWS IoT Events  |  `IoT Events`  | 
|  AWS IoT RoboRunner  |  `IoT RoboRunner`  | 
|  AWS IoT SiteWise  |  `IoT Sitewise`  | 
|  AWS IoT Wireless  |  `IoT Wireless`  | 
|  Amazon Kendra  |  `Kendra`  | 
|  Amazon Keyspaces (for Apache Cassandra)  |  `Keyspaces`  | 
|  Amazon Managed Service for Apache Flink  |  `Kinesis Analytics`  | 
|  Amazon Data Firehose  |  `Firehose`  | 
|  Kinesis Video Streams  |  `Kinesis Video Streams`  | 
|  AWS Key Management Service  |  `KMS`  | 
|  AWS Lambda  |  `Lambda`  | 
|  AWS Launch Wizard  |  `Launch Wizard`  | 
|  Amazon Lex  |  `Amazon Lex`  | 
|  Amazon Lightsail  |  `Lightsail`  | 
|  Amazon Location Service  |  `Location`  | 
|  Amazon Lookout for Vision  |  `Lookout for Vision`  | 
|  Amazon Machine Learning  |  `Amazon Machine Learning`  | 
|  Amazon Macie  |  `Macie`  | 
|  Amazon Managed Blockchain (AMB) Query  |  `Amazon Managed Blockchain Query`  | 
|  AWS Managed Services  |  `AWS Managed Services`  | 
|  AWS Marketplace Commerce Analytics  |  `Marketplace Analytics Service`  | 
|  AWS Elemental MediaConnect  |  `MediaConnect`  | 
|  AWS Elemental MediaConvert  |  `MediaConvert`  | 
|  AWS Elemental MediaLive  |  `MediaLive`  | 
|  AWS Elemental MediaStore  |  `Mediastore`  | 
|  AWS Elemental MediaTailor  |  `MediaTailor`  | 
|  AWS Mobile Hub  |  `Mobile Hub`  | 
|  AWS Network Firewall  |  `Network Firewall`  | 
|  OpsWorks  |  `OpsWorks`  | 
|  OpsWorks for Configuration Management  |  `OPsWorks CM`  | 
|  AWS Outposts  |  `Outposts`  | 
|  AWS Organizations  |  `Organizations`  | 
|  Amazon RDS Performance Insights  |  `Performance Insights`  | 
|  Amazon Pinpoint  |  `Pinpoint`  | 
|  AWS Private Certificate Authority  |  `Private Certificate Authority`  | 
|  Amazon Managed Service for Prometheus  |  `Prometheus`  | 
|  AWS Proton  |  `Proton`  | 
|  Amazon Quantum Ledger Database (Amazon QLDB)  |  `QLDB`  | 
|  Amazon RDS  |  `RDS`  | 
|  Amazon Redshift  |  `Redshift Data API`  | 
|  Amazon Rekognition  |  `Rekognition`  | 
|  AWS Resource Access Manager  |  `Resource Access Manager`  | 
|  AWS Resource Groups  |  `Resource Groups`  | 
|  AWS Resource Groups Tagging API  |  `Resource Groups Tagging API`  | 
|  Amazon Route 53 Domains  |  `Route 53 Domains`  | 
|  Amazon Route 53 Resolver  |  `Route 53 Resolver`  | 
|  Amazon S3  |  `S3`  | 
|  Amazon Glacier  |  `Amazon S3 Glacier`  | 
|  Amazon SageMaker Runtime  |  `Sagemaker`  | 
|  Savings Plans  |  `Savings Plans`  | 
|  AWS Secrets Manager  |  `Secrets Manager`  | 
|  AWS Security Hub CSPM  |  `Security Hub`  | 
|  AWS Server Migration Service  |  `AWS Server Migration Service`  | 
|  AWS Service Catalog AppRegistry  |  `Service Catalog AppRegistry`  | 
|  Service Quotas  |  `Service Quotas`  | 
|  AWS Shield  |  `Shield`  | 
|  AWS Signer  |  `Signer`  | 
|  Amazon Simple Notification Service  |  `SNS`  | 
|  Amazon Simple Email Service  |  `SES`  | 
|  Amazon Simple Queue Service  |  `SQS`  | 
|  Identity Store  |  `Identity Store`  | 
|  Storage Gateway  |  `Storage Gateway`  | 
|  AWS Support  |  `Support`  | 
|  Amazon Simple Workflow Service  |  `SWF`  | 
|  Amazon Textract  |  `Textract`  | 
|  AWS IoT Things Graph  |  `ThingsGraph`  | 
|  Amazon Timestream  |  `Timestream`  | 
|  Amazon Transcribe  |  `Transcribe`  | 
|  Amazon Translate  |  `Translate`  | 
|  Amazon Transcribe streaming transcription  |  `Transcribe Streaming`  | 
|  AWS Transfer Family  |  `Transfer`  | 
|  AWS WAF  |  `WAF`  | 
|  Amazon WorkLink  |  `WorkLink`  | 
|  Amazon WorkMail  |  `Amazon WorkMail`  | 
|  Amazon WorkSpaces  |  `Workspaces`  | 
|  AWS X-Ray  |  `X-Ray`  | 

Some services report usage metrics for additional APIs as well. To see whether an API reports usage metrics to CloudWatch, use the CloudWatch console to see the metrics reported by that service in the `AWS/Usage` namespace.

**To see the list of a service's APIs that report usage metrics to CloudWatch**

1. Open the CloudWatch console at [https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/).

1. In the navigation pane, choose **Metrics**.

1. On the **All metrics** tab, choose **Usage**, and then choose **By AWS Resource**.

1. In the search box near the list of metrics, enter the name of the service. The metrics are filtered by the service you entered.

# CloudWatch usage metrics
<a name="CloudWatch-Usage-Metrics"></a>

 CloudWatch collects metrics that track the usage of some AWS resources. These metrics correspond to AWS service quotas. Tracking these metrics can help you proactively manage your quotas. For more information, see [Visualizing your service quotas and setting alarms](CloudWatch-Quotas-Visualize-Alarms.md). Service quota usage metrics are in the `AWS/Usage` namespace and are collected every minute. 

The metrics that can be published in this namespace include `CallCount`, `ResourceCount`, and `ThrottleCount`. These metrics are published with the dimensions `Resource`, `Service`, and `Type`. The `Resource` dimension specifies the name of the API operation being tracked. For example, the `CallCount` metric with the dimensions `"Service": "CloudWatch"`, `"Type": "API"` and `"Resource": "PutMetricData"` indicates the number of times the CloudWatch `PutMetricData` API operation has been called in your account.

The `CallCount` metric does not have a specified unit. The most useful statistic for the metric is `SUM`, which represents the total operation count for the 1-minute period.

**Metrics**


| Metric | Description | 
| --- | --- | 
|  `CallCount`  |  The number of specified operations performed in your account.  | 

**Dimensions**


| Dimension | Description | 
| --- | --- | 
|  `Service`  |  The name of the AWS service containing the resource. For CloudWatch usage metrics, the value for this dimension is `CloudWatch`.  | 
|  `Class`  |  The class of resource being tracked. CloudWatch API usage metrics use this dimension with a value of `None`.  | 
|  `Type`  |  The type of resource being tracked. When the `Service` dimension is `CloudWatch`, the only valid value for `Type` is `API`.  | 
|  `Resource`  |  The name of the API operation. Valid values include the following: DeleteAlarms, DeleteDashboards, DescribeAlarmHistory, DescribeAlarms, GetDashboard, GetMetricData, GetMetricStatistics, ListMetrics, PutDashboard, and PutMetricData  | 