Skip to content

Instantly share code, notes, and snippets.

@JoaoCarabetta
Created March 21, 2019 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoaoCarabetta/37f1e178d3d9fc5603c91ac3d53aa921 to your computer and use it in GitHub Desktop.
Save JoaoCarabetta/37f1e178d3d9fc5603c91ac3d53aa921 to your computer and use it in GitHub Desktop.
Bulk delete AWS dynamodb tables
import boto3
table_filter = 'temp-cap'
dynamo = boto3.client('dynamodb')
tables = dynamo.list_tables()['TableNames']
tables = [t for t in tables if table_filter in t]
for t in tables:
try:
dynamo.delete_table(TableName=t)
except:
continue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment