From the course: AWS for Developers: S3
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Deleting a bucket - Amazon Web Services (AWS) Tutorial
From the course: AWS for Developers: S3
Deleting a bucket
- [Instructor] When you don't need a bucket, say because it was for temporary storage, you need a programmatic way to delete it. This is powerful in leveraging buckets for long running jobs and cleaning up after yourself when you're done. So let's take a look at the delete API. Jump back into our python file here, and we'll create another new method. This time calling it delete_bucket, we'll need to send it in a bucket name and our s3 resource. We will do a try on this. And we will go into the s3 bucket itself and we will call delete. And we will now except that. And print that error out. Now we will get rid of our download link. And we will first start by calling create_bucket. When we call create_bucket we use our transient name and s3. And then we will delete our bucket, using the TRANSIENT_BUCKET_NAME and s3. There's no real good way that I can think of to actually make sure that this works, so what I'm going to do…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Setting up an basic Python script2m 49s
-
Installing the SDK Boto31m 34s
-
Creating a bucket6m 10s
-
Binary object manipulation6m 50s
-
Bucket manipulation4m 59s
-
Bucket security5m 25s
-
Presigning URLs2m 54s
-
Deleting a bucket2m 3s
-
Challenge: Python SDK operations39s
-
Solution: Python SDK operations2m 51s
-
-
-