Skip to content

Instantly share code, notes, and snippets.

@zxkane
Created July 2, 2020 09:51
Show Gist options
  • Save zxkane/a21502fcee9a05d17d61f31fca04eb6f to your computer and use it in GitHub Desktop.
Save zxkane/a21502fcee9a05d17d61f31fca04eb6f to your computer and use it in GitHub Desktop.
delete multiple CloudWatch Log groups via one command
aws logs describe-log-groups --query "logGroups[].logGroupName" --log-group-name-prefix /aws/lambda/func-prefix | jq '.[]' | xargs -n 1 -I{} aws logs delete-log-group --log-group-name {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment