The content below is taken from the original ( Monitoring Service Limits with Trusted Advisor and Amazon CloudWatch), to continue reading please visit the site. Remember to respect the Author & Copyright.
Understanding your service limits (and how close you are to them) is an important part of managing your AWS deployments – continuous monitoring allows you to request limit increases or shut down resources before the limit is reached.
With the recent launch of Trusted Advisor metrics in Amazon CloudWatch, Business and Enterprise support customers can create customizable alarms for individual service limits. Let’s look at an example of how to do that.
Example: Create an alarm for EC2 On-Demand Instance limits
Begin by logging into the Trusted Advisor console and clicking the “Service Limits” link on the left side of the page. After doing so, you should see the new service limits dashboard.
Click the refresh icon in the top-right of the screen to retrieve the most current utilization and limit data for the service limit checks. This can take a while if you have a lot of AWS resources deployed, so be patient! Once complete, a notification will appear at the top of the Trusted Advisor console.
This ensures that CloudWatch has the most up-to-date information available from Trusted Advisor.
Next, head over to the CloudWatch console. Trusted Advisor passes a single metric called “ServiceLimitUsage” that represents the percentage of utilization versus the limit. You can filter these limits by region, limit, or service using the available dimensions.
Make sure you are in the US East (N. Virginia) region, then click the “Alarms” link on the left side of the page and then click the “Create Alarm” button.
Click “Service Limits by Region” under the “Trusted Advisor” category.
In the search bar, type “Overall On-Demand Instances”. This will filter the list of available limits down to the EC2 overall on-demand instance limits that are tracked by Trusted Advisor. Click the checkbox next to the limit for the us-east-1 region and click “Next”.
You can now set up your CloudWatch alarm for this limit. In this example, we’ve configured it to alarm when you’ve reached 60% of the EC2 On-Demand instance limit. Trusted Advisor updates these metrics once per week by default, but refreshing checks via the Trusted Advisor console or Support API will send updated metrics on demand.
You can repeat this process for any or all of the service limits covered by Trusted Advisor. For more information and a guide to creating these for any type of Trusted Advisor check, visit Creating Trusted Advisor Alarms Using CloudWatch.
About the Author
Scott Allison is the Senior Technical Product Manager for Trusted Advisor – an AWS service designed to keep your deployments secure, fault tolerant, and cost-effective. He enjoys working directly with customers and hearing the creative ways people use Trusted Advisor!