Skip to content

Instantly share code, notes, and snippets.

@skyzyx
Created July 19, 2018 22:25
Show Gist options
  • Save skyzyx/796405d62d24b1c51787e12c8b5ed22c to your computer and use it in GitHub Desktop.
Save skyzyx/796405d62d24b1c51787e12c8b5ed22c to your computer and use it in GitHub Desktop.
Remove all #CloudWatch Log Groups for #Lambda functions forwarding to #SumoLogic
for lg in $(aws logs describe-log-groups --query "logGroups[?logGroupName | contains(@, 'aws/lambda/sumologic')].logGroupName" --output text); do
echo "$lg";
aws logs delete-log-group --log-group-name "$lg";
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment