Deleting a directory bucket
You can delete only empty Amazon S3 directory buckets. Before you delete your directory bucket, you must delete all objects in the bucket and abort all in-progress multipart uploads.
To empty a directory bucket, see Emptying a directory bucket. To abort an in-progress multipart upload, see Aborting a multipart upload.
To delete a general purpose bucket, see Deleting a bucket.
After you empty your directory bucket and abort all in-progress multipart uploads, you can delete your bucket.
Sign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/
. -
In the left navigation pane, choose Buckets.
Choose the Directory buckets tab.
-
In the Directory buckets list, choose the option button next to the bucket that you want to delete.
-
Choose Delete.
-
On the Delete bucket page, enter the name of the bucket in the text field to confirm the deletion of your bucket.
Important
Deleting a directory bucket can't be undone.
-
To delete your directory bucket, choose Delete bucket.
The following examples delete a directory bucket by using the AWS SDK for Java 2.x and AWS SDK for Python (Boto3).
This example shows how to delete a directory bucket by using the AWS CLI. To use the command replace the user input placeholders
with your own information.
aws s3api delete-bucket --bucket
bucket-base-name
--zone-id
--x-s3 --regionus-west-2
For more information, see delete-bucket