This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create lambda resource base policy to allow CloudWatch Alarm invoke lambda function | |
aws lambda add-permission \ | |
--function-name <your-lambda-function-name> \ | |
--statement-id AlarmAction \ | |
--action lambda:invokefunction \ | |
--principal sns.amazonaws.com \ | |
--source-arn arn:aws:sns:<your-aws-region>:<your-aws-account-id>:<your-sns-topic-name> | |
# Force CloudWatch Alarm become IN ALARM state |