You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Get an error from trying to delete the table header rows..could exclude them, but text output does the job!
aws logs describe-log-groups --query 'logGroups[*].logGroupName' --output text | while read -a tmp_arr; do for x in "${tmp_arr[@]}"; do aws logs delete-log-group --log-group-name $x; done; done
@dhruvit01. I don't think there's a way to just delete everything without looping, but you can wrap the aws cli command in an execution to not get feedback:
Replace PREFIX with your own, such as "/aws/lambda/ci"
Run and verify that it (eventually) prints some reasonable commands
Run without the echo safety catch
Features:
The delay + retry uses exponential backoff,as recommended by AWS, slowing down and speeding up depending on whether the commands succeed. See man parallel for details.
Verbose mode prints each command as it runs, so you can review them after the fact.
Neat!