spring-petclinic/infra/scripts/cleanup_dynamo_ci.py
Jesse Houldsworth 00ed61ebb5 tf
2025-10-09 06:46:44 -07:00

22 lines
546 B
Python

import boto3
from tqdm import tqdm
def main() -> None:
db = boto3.resource("dynamodb")
num_to_delete = 0
all_tables = db.tables.all()
for table in all_tables:
if "integration_test" in table.name:
num_to_delete += 1
with tqdm(total=num_to_delete) as progress:
for table in all_tables:
if "integration_test" in table.name:
table.delete()
progress.update()
print(f"Deleted {num_to_delete} CI DynamoDB tables")
if __name__ == "__main__":
main()