Skip to content

Instantly share code, notes, and snippets.

@carlosolmos
Created August 30, 2018 17:23
Show Gist options
  • Save carlosolmos/0fb6fb5ae0b2a9074a5fa87c9428843a to your computer and use it in GitHub Desktop.
Save carlosolmos/0fb6fb5ae0b2a9074a5fa87c9428843a to your computer and use it in GitHub Desktop.
[Parse AWS Logs] example of how to parse aws cloudwatch logs
#Requirements:
# aws cli
# jq
aws logs get-log-events --log-group-name LOGGROUP --log-stream-name STREAMID \
--limit 100 | jq '.events | .[] | .message' | \
awk '{printf "%s:%s\t->\t%s:%s\n", $4, $6, $5, $7}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment