Skip to content

Commit

Permalink
Merge pull request #139 from North-Seattle-College/Issue_#116_Fix_scr…
Browse files Browse the repository at this point in the history
…ipt_to_delete_all_s3_buckets_even_with_data

DeletingAllS3BucketsIssue116.py
  • Loading branch information
1jc authored Mar 20, 2022
2 parents 6a1a2a3 + a8cb2b5 commit 7ec739e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions devops/DeleteAllS3BucketsIssue116.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#s3BucketDelete.py for issue 87 Create a cleanup script for all s3 buckets 1jc
#revision for issue 116 Sprint 4 Fix issue #87 Fix script to delete all s3 buckets even with data 1jc

import boto3
client = boto3.client('s3')
response = client.list_buckets()
for name in response ['Buckets']:
print (name['Name'])

response = client.delete_buckets()
print(response)

0 comments on commit 7ec739e

Please sign in to comment.