Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
November 15, 2022 05:50 am GMT

Python Script to Quickly Delete S3 Buckets

I got frustrated having to empty and delete S3 buckets using the AWS Console, so I created a Python script to do it for me!

BUCKETS = [    "bucket-one",    "bucket-two",]import boto3s3 = boto3.resource("s3")for bucket_name in BUCKETS:    bucket = s3.Bucket(bucket_name)    bucket.object_versions.delete()    bucket.delete()

Original Link: https://dev.to/wesleycheek/python-script-to-quickly-delete-s3-buckets-22b2

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To