Delete a bucket
A DELETE issued to an empty bucket resource deletes the bucket. After
deleting a bucket the name is reserved by the system for 10 minutes then released for re-use.
Only empty buckets can be deleted. This operation does not make use of operation specific
headers, query parameters, or payload elements.
Syntax
DELETE https://{endpoint}/{bucket-name} # path style
DELETE https://{bucket-name}.{endpoint} # virtual host style
Sample request
DELETE /images HTTP/1.1
Host: 67.228.254.193
x-amz-date: 20160822T064812Z
Authorization: {authorization-string}
The server responds with 204 No Content.
If a non-empty bucket is requested for deletion, the server responds with 409
Conflict.
Sample request
DELETE /example HTTP/1.1
Authorization: {authorization-string}
x-amz-date: 20160825T174049Z
Host: 67.228.254.193
Sample response
<Error>
<Code>BucketNotEmpty</Code>
<Message>The bucket you tried to delete is not empty.</Message>
<Resource>/example-bucket/</Resource>
<RequestId>9d2bbc00-2827-4210-b40a-8107863f4386</RequestId>
<httpStatusCode>409</httpStatusCode>
</Error>