Nearly every Amazon Web Services (AWS) service has limits on how many resources you can launch in a specific AWS Region at a given time. AWS maintains service limits to help provide highly-available, reliable, and robust services to all of our customers, and to minimize billing risk for new customers. Tracking service usage against limits can help identify resources that are no longer in use and serve as a reminder to proactively request a service-limit increase.

To help customers more actively track their AWS resource usage against service limits, AWS offers the AWS Limit Monitor solution, a reference implementation that automatically provisions the services necessary to proactively track resource usage and send notifications as you approach limits. The solution is easy-to-deploy and leverages the AWS Trusted Advisor Service Limits checks that display your usage and limits for specific AWS services. With the AWS Limit Monitor, you can receive email notifications or notifications can be sent to your existing Slack channel, enabling you to request limit increases or shut down resources before the limit is reached.

This webpage provides best practices and guidance to consider for managing your service limits, as well as an overview of the AWS Limit Monitor solution.

When running infrastructure on the AWS Cloud, have an active understanding of the number of resources launched in your account. Monitoring service usage can help you identify resources that are no longer in use. With this in mind, consider the following AWS best practices:

  • To minimize service usage in your account, launch only the AWS resources you need. Minimizing the number of resources in your account will prevent you from unintentionally exceeding a service limit.
  • To maintain usage under a limit threshold, regularly audit your resource usage and terminate resources that are not in use.
  • Automate the monitoring of your service usage against limits. Automated actions are more reliable than manual processes, helping to provide notification before you hit a limit.
  • Know how to request a service-limit increase. Some service limits are raised automatically as you build a history with AWS, though most AWS services require that you request limit increases manually.

AWS offers a solution that automatically checks service usage against limits and sends an email or Slack notification when usage approaches a service limit. The diagram below presents the AWS Limit Monitor architecture you can deploy in minutes using the solution's implementation guide and accompanying AWS CloudFormation template.

  1. This solution uses AWS Lambda to automatically refresh the AWS Trusted Advisor Service Limits checks to retrieve the most current utilization and limit data through API calls.
  2. Trusted Advisor calculates usage against the limit to determine whether the status is OK (less than 80% utilization), WARN (between 80% and 99% utilization), or ERROR (100% utilization). 
  3. Amazon CloudWatch Events captures the status events from Trusted Advisor and uses a set of CloudWatch Events rules to send the status events to all the targets you choose during initial deployment of the solution: an Amazon Simple Queue Service (Amazon SQS) queue, an Amazon Simple Notification Service (Amazon SNS) topic (optional), or a Lambda function for Slack notifications (optional).
  4. If you enable Slack notifications during initial deployment, the solution will launch a Lambda function that sends notifications to your existing Slack channel.  
Deploy Solution
Implementation Guide

What you'll accomplish:

Deploy AWS Limit Monitor using AWS CloudFormation. The CloudFormation template will automatically launch and configure the components necessary to proactively track your usage of AWS resources against service limits and send email or Slack notifications as you approach limits.

Automatically receive email or Slack notification as you approach service limits. If usage exceeds 80% of a service limit, AWS Limit Monitor publishes a message to a Slack channel or an Amazon Simple Notification Service topic which is sent to an email address you specify.

What you'll need before starting:

An AWS account: You will need an AWS account to begin provisioning resources. Sign up for AWS.

Premium support: To monitor usage for service limits included in Trusted Advisor, each account must have a Business- or Enterprise-level AWS Support plan in order to gain access to the AWS Support API.

Skill level: This solution is intended for IT infrastructure and networking professionals who have practical experience architecting on the AWS Cloud.

Q: Why should I track my service usage against limits?

Tracking your usage against AWS service limits will show you whether you are approaching a given limit so you can proactively request a service limit increase before you exceed a limit.

Q: Can AWS Limit Monitor check limits in multiple accounts?

Yes. The solution includes a spoke template you can deploy in secondary accounts to monitor resource usage in secondary accounts and send notification as you approach limits.

Q: Can I specify what services to monitor?

Yes. By default, this solution checks all service limits that Trusted Advisor checks. But, you can specify which service limits you want to check in both the primary and secondary accounts. For more information, see the implementation guide

Q: Do I need premium support to use AWS Limit Monitor?

To use this solution, each account must have a Business- or Enterprise-level AWS Support plan.

Q: Can I deploy the AWS Limit Monitor in any AWS Region?

You must launch this solution’s AWS CloudFormation templates in the US East (N. Virginia) Region. However, once deployed, the solution will monitor limits for all regions in the account.

Need more resources to get started with AWS? Visit the Getting Started Resource Center to find tutorials, projects and videos to get started with AWS.

Tell us what you think