Posted On: Dec 24, 2023
Today, Amazon CloudWatch alarms support Amazon Lambda functions as an alarm state change action. Customers can now choose to invoke a Lambda function when a CloudWatch alarm changes to an OK, ALARM or INSUFFICIENT_DATA state. This makes it easier for customers to automate custom actions on alarm state changes.
Customers use CloudWatch alarms to take proactive automated remediation actions when they detect a potential issue or unhealthy resource. When an alarm changes state, customers can choose between several actions, such as executing Amazon EC2 actions or running a command with Amazon Systems Manager. Customers also use Amazon Lambda to implement rich automation response. However, they needed to rely on application-to-application messaging or event triggers to invoke such Lambda functions. Customers can now call a Lambda function directly from CloudWatch when an alarm state changes, which simplifies their automated remediation response architecture.
Amazon CloudWatch alarms support for Amazon Lambda actions is now available in the Amazon Web Services China (Beijing) Region, operated by Sinnet, and the Amazon Web Services China (Ningxia) Region, operated by NWCD.
Standard CloudWatch pricing applies to alarms you create, see the Amazon CloudWatch pricing page. To learn more about this feature, visit the Amazon CloudWatch documentation page. To invoke Lambda actions on alarm state changes, create or update an alarm using the Amazon CloudWatch Management Console or the CloudWatch Command Line Interface (CLI), and specify the Lambda function to invoke on OK, ALARM or INSUFFICIENT_DATA state changes.