Created
March 23, 2019 12:14
-
-
Save pcolazurdo/8ea184bda930578c6e61d27cde8e024a to your computer and use it in GitHub Desktop.
Help to Maintain CloudWatch Logs Groups clean
This file contains hidden or 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
filter=example | |
aws logs describe-log-groups --region us-west-2 | jq -r '.logGroups[].logGroupName' | grep $filter | while read a | |
do | |
aws logs delete-log-group --log-group-name $a --region us-west-2 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment