send filtered log message of Metric Filter to Lambda function

0

Hi All,

I want to know weather I can send filtered log message of Metric Filter to Lambda function, just like subscription filter. But there is a limit of 2 subscription filters per log group so I cannot use it. Suggest me if any possible ways with metric filter.

1 réponse
0
Réponse acceptée

You cannot send logs to Lambda using a metrics filter.
Metrics filtering is a function that filters logs and counts necessary information as metric values.
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/MonitoringLogData.html

You can search and filter the log data coming into CloudWatch Logs by creating one or more metric filters. Metric filters define the terms and patterns to look for in log data as it is sent to CloudWatch Logs. CloudWatch Logs uses these metric filters to turn log data into numerical CloudWatch metrics that you can graph or set an alarm on.

Use the subscription filter.
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/SubscriptionFilters.html#LambdaFunctionExample

profile picture
EXPERT
répondu il y a 10 mois
profile picture
EXPERT
vérifié il y a 2 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions