Skip to content

Instantly share code, notes, and snippets.

@jincod
Last active April 26, 2018 18:23
Show Gist options
  • Save jincod/e9f8eef89a5332017edc9492493dbbf3 to your computer and use it in GitHub Desktop.
Save jincod/e9f8eef89a5332017edc9492493dbbf3 to your computer and use it in GitHub Desktop.
Powershell script: Delete all log groups from AWS CloudWatch
aws logs describe-log-groups --query logGroups --output json | ConvertFrom-Json |
ForEach-Object {$_.logGroupName} | ForEach-Object { aws logs delete-log-group --log-group-name $_ }
@jincod
Copy link
Author

jincod commented Nov 22, 2017

Hi @RobertboothVentech

Sorry for the late answer. I didn't get any notifications.

I missed --output json options for all aws cli calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment