I have created a Lambda function which will be triggered via a subscription to a CloudWatch Log Pattern and the function will in-turn pass the logs to a web-hook (Refer https://gist.github.com/tomfa/f4e090cbaff0189eba17c0fc301c63db).
Now, I need this lambda function to EXECUTE only if the the function is called "x" times in "y" minutes.
Is it possible to disable/enable a lambda through SNS. Another idea is to 1. Create CloudWatch Events on State Change 2. Subscribe this to a SNS which will enables the lambda, if state goes from OK to ALARM disables the lambda, if state goes back to OK