Visualizing your service quotas and setting alarms
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 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.
Currently, the following services integrate their usage metrics with Service Quotas:
-
AWS CloudHSM
-
Elastic Load Balancing
-
AWS Fargate
-
AWS Key Management Service
-
Amazon SageMaker
To visualize a service quota and optionally set an alarm
-
Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/
. -
In the navigation pane, choose Metrics.
-
On the All metrics tab, choose Usage, and then choose By AWS Resource.
The list of service quota usage metrics appears.
-
Select the check box next to one of the metrics.
The graph displays your current usage of that AWS resource.
-
To add your service quota to the graph, do the following:
-
Choose the Graphed metrics tab.
-
Choose Math expression, Start with an empty expression. In the new row, under Details, enter
SERVICE_QUOTA(m1)
.A new line is added to the graph, displaying the service quota for the resource represented in the metric.
-
To see your current usage as a percentage of the quota, add a new expression or change the current SERVICE_QUOTA expression. The new expression to use is
m1/SERVICE_QUOTA(m1)*100
.(Optional) To set an alarm that notifies you if you approach the service quota, do the following:
-
On the row with
m1/SERVICE_QUOTA(m1)*100
, under Actions, choose the alarm icon. It looks like a bell.The alarm creation page appears.
-
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. -
Choose Next.
-
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.
-
On the next page, enter a name and description for the alarm, and then choose Next.
-
Choose Create alarm.
-