DELETE Bucket

Description

The DELETE request operation deletes the bucket named in the URI. All objects in the bucket must be deleted before the bucket itself can be deleted.

Only the owner of a bucket can delete it, regardless of the bucket's access control policy.

Requests

Syntax

DELETE / HTTP/1.1
Host: destinationBucket.s3.amazonaws.com
Date: date
Authorization: signature

Headers

This operation uses standard request headers.

Responses

Success Response

Syntax

HTTP/1.1 204 No Content
x-amz-id-2: id
x-amz-request-id: request_id
Date: date
Connection: close
Server: AmazonS3

Elements

There operation uses standard response elements.

Special Errors

There are no special errors for this operation. For information about general Amazon S3 errors, see List of Error Codes.

Examples

Sample Request

This example deletes the bucket named "quotes".

DELETE / HTTP/1.1
Host: quotes.s3.amazonaws.com
Date: Wed, 01 Mar  2006 12:00:00 GMT
Authorization: AWS 15B4D3461F177624206A:xQE0diMbLRepdf3YB+FIEXAMPLE=

Sample Response

Amazon S3 returns a response.

HTTP/1.1 204 No Content
x-amz-id-2: JuKZqmXuiwFeDQxhD7M8KtsKobSzWA1QEjLbTMTagkKdBX2z7Il/jGhDeJ3j6s80
x-amz-request-id: 32FE2CEB32F5EE25
Date: Wed, 01 Mar  2006 12:00:00 GMT
Connection: close
Server: AmazonS3

Related Resources