Reputation: 39
How can i notify a result of lambda when status OK(normal) and NG both?
I set a alarm on cloudwatch when status NG. It was working. But when i got OK(normal) status, i couldn't get notify email. I set up custom metrics by lamda result log when OK(normal) status on cloudwatch alarm.
Is it possible on alarm? Is there an any simple way?
Upvotes: 0
Views: 1612
Reputation: 269340
It sounds like your requirements are:
ALARM
stateOK
stateEach AWS CloudWatch alarm can be configured with multiple Actions.
Therefore, you can create one Action for ALARM
and another action for OK
:
The CloudWatch Alarm can send a notification to an Amazon SNS topic. The AWS Lambda function can subscribe to the SNS topic and will be triggered when the alarm sends the notification to SNS.
Upvotes: 3