2

I have a number of lambda functions which run my serverless backend. Something somewhere is misbehaving, and I need to bring up/search all the logs from a particular time — from all log groups, not just a single one, or a single stream.

Is there a good way to search across all log groups and all streams?

I have tried the console, but this insists on driving down from log groups (for lambda, these equate to functions) and using the command line, which also only works per log group.

Ideally, I want to start by being able to see all the reports for all the function executions on one day, so I can query to see which functions were misfiring, or running too long.

Is there a way to search across all the logs for all my functions?

Thanks in advance — let me know if you need more detail.

Mike

  • https://stackoverflow.com/questions/58141468/any-way-to-search-across-all-log-streams-in-a-cloud-watch-log-group – Tim Aug 04 '21 at 02:46
  • Thanks Tim. Unfortunately, what I actually need is a way to search across multiple log groups, not just log streams within one group. Essentially, I have numerous functions, and I want to search through all their logs at once, not search each one's logs one at a time. – Mike Ashelby Aug 04 '21 at 09:00

1 Answers1

5

You can select multiple log groups in Cloudwatch Log Insights to search across multiple log groups / streams. Query syntax is here. The syntax is a bit fiddly but not difficult.

CloudInsightsSelection

CloudInsightsOpen

Tim
  • 30,383
  • 6
  • 47
  • 77