AWS CloudWatch Alarms, Events, and EventBridge

Learn about EventBridge, a new AWS service, and build on your understanding of CloudWatch.

CloudWatch alarms

CloudWatch alarms monitor a single AWS metric and trigger actions (Lambda functions, scaling actions, CloudWatch Events, and more) if it crosses a defined threshold. A CloudWatch alarm can be in one of three states:

  • OK: The metric is within the defined threshold.
  • ALARM: The metric is breaching the defined threshold.
  • INSUFFICIENT_DATA: The metric is unavailable, or the alarm was just created, and it doesn’t have sufficient data to determine an alarm state.

When creating the alarm, we have to specify its period, evaluation period, and data points. Knowing these settings is essential for the exam.

  • Period: The length of time to evaluate the metric to create a data point in the alarm. This value is specified in seconds.
  • Evaluation period: The number of most recent periods that are considered when determining the alarm state.
  • Data points to alarm: The number of data points in the evaluation period that have to breach the threshold to go to the ALARM state.

If a data point is unavailable in a metric for any reason, it’s considered missing data. We can configure CloudWatch to treat missing data as:

  • Missing: The alarm doesn’t consider missing data points when evaluating the alarm state. If the alarm is unable to compute its state because of missing data, it enters the INSUFFICIENT_DATA state.
  • Breaching: Missing data points are considered to be breaching the threshold.
  • notBreaching: Missing data points are considered within the threshold.
  • Ignore: Alarm state is maintained.

The exam might include questions like “What will be the final state of alarm for the following?”

Let’s evaluate the alarm state for the following metric graph if:

  • Period = 1 minute
  • Evaluation period = 5
  • Data points to alarm = 3
  • Threshold = 4

Get hands-on with 1200+ tech skills courses.