Skip to content

Instantly share code, notes, and snippets.

@raglin
Last active October 3, 2018 11:24
Show Gist options
  • Select an option

  • Save raglin/29736f2514b4efaac78994a5391652b0 to your computer and use it in GitHub Desktop.

Select an option

Save raglin/29736f2514b4efaac78994a5391652b0 to your computer and use it in GitHub Desktop.
delete all aws log groups
aws logs describe-log-groups | jq '.logGroups[].logGroupName' | sed s/\"//g | while read line; do aws logs delete-log-group --log-group-name $line; done
## Powershell friendly
aws logs describe-log-groups --query 'logGroups[*].[logGroupName]' --output text | foreach { 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