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 parsnips/fbd837e4fbc88d10429e9ebb1c051caf to your computer and use it in GitHub Desktop.
Save parsnips/fbd837e4fbc88d10429e9ebb1c051caf to your computer and use it in GitHub Desktop.
Using AWS CLI to query CloudWatch Logs with Insights. Looking -30 mins to now.
aws logs start-query \
--profile clientProfile \
--log-group-name MY-LOG_GROUP \
--start-time `date -v-30M "+%s"` \
--end-time `date "+%s"` \
--query-string 'fields @message | filter @message like /my query/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment