Last active
March 28, 2024 07:41
-
-
Save johanforssell/16afa0f540a08576ddbdb44deadf81cc to your computer and use it in GitHub Desktop.
Use the AWS CLI to delete all Route53 query logging configs
This file contains 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/sh | |
# Make sure you're authenticated to use the AWS CLI. | |
# | |
# List all Route 53 query logging configs, iterate over their Ids and delete them. | |
# The call to jq flattens the list of configs down to just the list of Ids. | |
# | |
aws route53 list-query-logging-configs \ | |
| jq -r '.[][]|[.Id]|@tsv' \ | |
| xargs -L1 -I'{}' aws route53 delete-query-logging-config --id '{}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment