Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinhooke/9c84601f7e42a7d9666d35b76ac3e1f0 to your computer and use it in GitHub Desktop.
Save kevinhooke/9c84601f7e42a7d9666d35b76ac3e1f0 to your computer and use it in GitHub Desktop.
CloudWatch Insights query examples
fields @timestamp, @message
| filter @message like /string pattern to match/
| sort @timestamp asc
fields @timestamp
| filter @message like /string pattern to match/
#parse line, match a pattern, capture pattern match in this case * as named value userId
| parse "\"userId\": \"*\"" as userId
#only include where this has a value
| filter ispresent(userId)
| sort @timestamp asc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment