Command line application to query AWS CloudWatch Logs
go install github.com/fogfish/awslog@latest
Note: go get installs the application to $GOPATH/bin
. This folder shall be accessible to your user and be part of the PATH
environment variable. Please see Golang instructions.
awslog stream -g "/aws/lambda/myfun" -q "some pattern"
optionally use filter and pattern syntax to control visibility of events.
awslog latest -g "/aws/lambda/myfun" -q query.insight -t 3h
it uses Logs Insight Queries to collect events from the logs. See query syntax for details
fields @timestamp, @message
| filter @message like /debug/ and ...
| sort @timestamp desc
| limit 20