Alarms
CloudWatch alarms provide monitoring for our AWS resources and applications. An alarm uses a metric to monitor; if the metric's value crosses the threshold value defined for a certain period of time, an alarm action is triggered, which can be either an EC2 action, an auto scaling action, or a SNS event. CloudWatch maintains the state of change for a certain period of time. For every state of change, an alarm action can be triggered, so that we can take action properly. The following are the alarm states:
- OK: Metric value is within the limits of the threshold value
- ALARM: Metric value crosses the threshold value
- INSUFFICIENT_DATA: Metric value is not available or there is not enough data to identify the alarm state
Note
IMPORTANT: We can create up to 5,000 alarms per region per AWS account.
Let's see how to create alarms using the AWS Management Console, AWS CLI, AWS SDK – Java, and CloudFormation. For our example, we will create an alarm for the RDS instance's CPU utilization. If the RDS...