CloudWatch Insights queries for error logs in Lambda

kru

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

kru

I managed to solve this issue by :

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

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to filter CloudWatch logs from Lambda with a JSON Metric Filter

tailing aws lambda/cloudwatch logs

CloudWatch logs delayed for a lambda function

CloudWatch logs stream to Lambda python

Finding logs for lambda function errors in AWS Cloudwatch?

AWS lambda does not write logs in the CloudWatch

Disable CloudWatch to monitor logs for Lambda function

CloudWatch Logs Insights Parse Syntax

How to search for plain text in cloudwatch logs insights?

AWS CloudWatch Logs Insights - export full query result?

Lambda (connected with Kinesis Data Stream) function generating cloudwatch logs continuously

How to query AWS CloudWatch logs using AWS CloudWatch Insights?

Handling single quote in AWS Cloudwatch Logs Insights

AWS CloudWatch Logs Insights alarms

How to aggregate logs by field and then by bin in AWS CloudWatch Insights?

Filter by timestamp query on AWS Cloudwatch Logs Insights

AWS Cloudwatch Log Insights query using Regex does not extract columns for MySql Slow Query Logs

CloudWatch Insights - Group logs by url with unique ids removed

Why can't I see CloudWatch Logs for Lambda function?

How to add CloudWatch Lambda Insights to serverless config?

AWS Lambda targerting CloudWatch Logs

CloudWatch Lambda Insights

Cloudwatch logs filter to trigger lambda then extract values from log data

Winston CloudWatch Transport not Creating Logs When Running on Lambda

Getting error on invoking lambda through terraform after deployment. And finding no logs in Cloudwatch

cloudwatch lambda logs not showing nested object content

OpenTelemetry JavaScript Lambda CloudWatch logs not grouping

Amazon Cloudwatch Logs Insights

Why does not .show queries work in Azure App Insights logs query?