Created
May 23, 2021 03:26
-
-
Save nitesh8860/0841118dc87b574ed5e60d76d38cf5a0 to your computer and use it in GitHub Desktop.
deletes log groups in bulk from cloudwatch
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
export AWS_DEFAULT_REGION=eu-west-1 | |
aws logs describe-log-groups --query 'logGroups[*].logGroupName' --output table | \ | |
awk '{print $2}' | grep ^/aws/rds | while read x; do echo "deleting $x" ; aws logs delete-log-group --log-group-name $x; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment