Delete a bucket
Delete an empty bucket; its name becomes available to anyone again.
Only an empty bucket can be deleted: no objects, no older versions, no delete markers. Empty it first (see Empty a bucket). Replace example-uploads with your bucket's name.
Warning
Once deleted, the bucket's name is free for anyone on the platform to take.
Prerequisites
- Permission for
s3:DeleteBucketon the bucket. - The bucket is empty, and no other bucket replicates into it.
Delete the bucket
- Open Object Storage, then open the bucket.
- In the ⋯ menu, choose Delete bucket.
- Enter the bucket's name to confirm, then choose Delete bucket.
The console returns to the bucket list. From the bucket list, the row's ⋯ menu has the same
Delete bucket; there, enter the name and choose Delete. Without s3:DeleteBucket,
Delete bucket is unavailable in both menus; for a bucket a database or Kafka cluster
manages, it says the bucket is deleted together with it.
dcloud s3 buckets delete example-uploadsDELETE /s3/api/buckets/example-uploadsRemove the dcloud_bucket resource and apply. Terraform's delete is refused like any other while
the bucket holds objects.
If the delete is refused
- 409
example-uploads is not empty. Empty it first (the bucket's "Empty bucket" action, or delete-prefix with allVersions), then delete it. - 409
example-uploads is a replication destination of …. Remove that replication first.: remove the replication on the source bucket (see Replicate a bucket). - 409
“rds-…” belongs to database … and is deleted with it: a database's backup bucket goes with the database. - 409
“…” holds the tiered storage of Kafka cluster … and is deleted with it: a Kafka cluster's tiered-storage bucket goes with the cluster. - 409
example-uploads still lists … entries that storage cannot read or delete. This is a fault on our side, not something you can fix: we repair such buckets, and you can delete it once that is done.See Troubleshooting. - 409
Object storage still counts objects in example-uploads that were just deleted. Try again in a few minutes. - 503
Object storage does not see example-uploads everywhere yet (it can take a minute after a bucket is created). Try again in a minute., withRetry-After: 60. - 403
Forbiddenwithouts3:DeleteBucketon the bucket.