Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Selimcse98/036515bb5723d3da846a5906a5666cd5 to your computer and use it in GitHub Desktop.
Save Selimcse98/036515bb5723d3da846a5906a5666cd5 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