CloudWatch Insights queries for error logs in Lambda

Viewed 3830

I want to add CloudWatch custom dashboard for the Lambda's error logs. I want the metric with only logs which are reflecting ERRORs in Lambda function. I tried with following query in log insights but it is not working:

fields @timestamp, @message
| sort @timestamp desc
| filter @message like ERROR
| limit 20

Also I tried to create filter but it is showing me There are no metrics in this namespace for the region "Europe (London)"

1 Answers

I managed to solve this issue by :

> fields @message
>     | parse @message "[*] *" as loggingType, loggingMessage
>     | fields @message | filter @message like /Error/
>     | display loggingMessage
>     | limit 500
Related