DELETE Object

Description

The DELETE request operation removes the specified object from Amazon S3. Once deleted, there is no method to restore or undelete an object.

[Note]Note

If you delete an object that does not exist, Amazon S3 will return a success (not an error message).

Requests

Syntax

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

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

This 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

This example deletes the "Nelson" object from the "quotes" bucket.

Sample Request

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

Sample Response

HTTP/1.1 204 No Content
x-amz-id-2: 4NJT5+xl9kKL1w8YnhfDTbMPvBEIbl8Ek/kuX55i+4FTSINVbcRDVnhi4TZGcj1y
x-amz-request-id: 7FA15BA5170D44B0
Date: Wed, 01 Mar  2006 12:00:00 GMT
Connection: close
Server: AmazonS3

Related Resources