Created
May 17, 2022 18:06
-
-
Save kevinhooke/9c84601f7e42a7d9666d35b76ac3e1f0 to your computer and use it in GitHub Desktop.
CloudWatch Insights query examples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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