Created
October 20, 2020 07:17
-
-
Save neilkuan/ddaf4003dd757d6c7b6b44bc75e8283b to your computer and use it in GitHub Desktop.
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
| #!/bin/bash | |
| export AWS_DEFAULT_REGION=ap-northeast-1 | |
| aws logs describe-log-streams --log-group-name fluentbit-cloudwatch --query 'logStreams[*].logStreamName' --output table \ | |
| | awk '{print $2}' | grep ^$2 \ | |
| | while read x; do echo "deleting $x" ; aws logs delete-log-stream --log-group-name $1 --log-stream-name $x; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment