Acting on alarm changes
CloudWatch can notify users on two types of alarm changes: when an alarm changes state, and when the configuration of an alarm gets updated.
When an alarm evaluates, it might change from one state to another, such as ALARM, OK or INSUFFICIENT_DATA. These alarm state changes can signal a possible incident, a return to normal, or a metric being unavailable. In such cases, you might want to the alarm to automatically take one of the following actions
Send a notification to a SNS topic as part of the alarm’s actions. An SNS topic can then be configured for application-to-application (A2A) messaging as well as application-to-person (A2P) notifications, including channels such as email notifications and SMS. All the destinations that you define for your SNS topic receive the alarm notification. For more information, see Amazon SNS event destinations.
You can configure notifications for alarm state change events. Amazon User Notifications offers a native way to configure such notifications and is the recommended approach.
Reboot, stop, recover, or terminate an Amazon EC2 instance. For more information, see Create alarms to stop, terminate, reboot, or recover an EC2 instance.
Scale the capacity of an Amazon EC2 Auto Scaling group. For more information, see Step and simple scaling policies for Amazon EC2 Auto Scaling.
Start an investigation in Amazon Q operational investigations. For more information, see Start an investigation in Amazon Q operational investigations from an alarm
Invoke a Lambda function.
Create an incident in Systems Manager Incident Manager. For more information, see Creating incidents automatically with CloudWatch alarms.
Create an OpsItem in Systems Manager OpsCenter. For more information, see Configure CloudWatch alarms to create OpsItems.
Additionally, CloudWatch sends events to Amazon EventBridge whenever alarms change state, and when alarms are created, deleted, or updated. You can write EventBridge rules to take actions or be notified when EventBridge receives these events.