I created a lambda function to send an SNS notification every time it matches a particular keyword from cloudwatch logs.This is the filter pattern where the lambda function gets triggered
The only problem here is lambda only sends a mail once when a particular keyword is found in cloudwatch logs even if there are similar words in the logs repeating multiple times. I want it to send an SNS mail 5 times if it finds the same word 5 times.
Please let me know if this is understandable.
This is my whole lambda structure and This is the lambda code
Thanks! Code I use is python