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.
If the directory bucket is attached to an access point, you must delete the access point first. For more information, see Delete your access point for directory buckets.
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 general purpose bucket.
After you empty your directory bucket and abort all in-progress multipart uploads, you can delete your bucket.
Sign in to the Amazon Web Services Management Console and open the Amazon S3 console at https://console.amazonaws.cn/s3/
. -
In the left navigation pane, choose Directory buckets.
-
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 Amazon SDK for Java 2.x and Amazon SDK for Python (Boto3).
This example shows how to delete a directory bucket by using the Amazon 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