Skip to content

Instantly share code, notes, and snippets.

@mtranter
Created December 22, 2020 05:48
Show Gist options
  • Save mtranter/c330b7bc016f6932f9fbce56ffd3f0c1 to your computer and use it in GitHub Desktop.
Save mtranter/c330b7bc016f6932f9fbce56ffd3f0c1 to your computer and use it in GitHub Desktop.
Bash script to bulk delete athtena tables
aws glue get-tables --database-name lyne --max-results 100 \
| jq '.TableList[].Name' \
| tr '\n' ' ' \
| xargs -I {} echo "aws glue batch-delete-table --database-name lyne --tables-to-delete {}" \
| sh -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment