bucket_not_empty
HTTP 409 Bucket is not empty
What happened
Only an empty bucket can be deleted, and this one still holds objects - old versions and delete markers of a versioned bucket count too.
What to do
Delete the objects with your S3 tools, then repeat the same request; or delete the bucket together with all its objects in the client area. Objects held by an Object Lock retention cannot be deleted with S3 tools before the retention ends, so such a bucket answers this code until then; deleting it in the client area removes them too, irreversibly.
Retrying
Change the state this refers to, then repeat the same request with the same idempotency key.
How it arrives
{
"type": "https://docs.fiberax.com/errors/bucket_not_empty",
"title": "Bucket is not empty",
"status": 409,
"code": "bucket_not_empty",
"request_id": "a277dcd1ca652c65"
}
Branch your code on code, never on the wording of title.