Score:1

How can I search across CloudWatch log groups on AWS?

za flag

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

Tim avatar
gp flag
Tim
https://stackoverflow.com/questions/58141468/any-way-to-search-across-all-log-streams-in-a-cloud-watch-log-group
Mike Ashelby avatar
za flag
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.
Score:3
gp flag
Tim

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

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.