Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CloudWatch Insights queries for error logs in Lambda

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)"

like image 216
kru Avatar asked Jul 03 '26 07:07

kru


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
like image 50
kru Avatar answered Jul 05 '26 01:07

kru