Amazon Simple Storage Service
API Reference (API Version 2006-03-01)

DeleteObject (SOAP API)


SOAP support over HTTP is deprecated, but it is still available over HTTPS. New Amazon S3 features will not be supported for SOAP. We recommend that you use either the REST API or the AWS SDKs.

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


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


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

Sample Request

<DeleteObject xmlns=""> <Bucket>quotes</Bucket> <Key>Nelson</Key> <AWSAccessKeyId> AKIAIOSFODNN7EXAMPLE</AWSAccessKeyId> <Timestamp>2006-03-01T12:00:00.183Z</Timestamp> <Signature>Iuyz3d3P0aTou39dzbqaEXAMPLE=</Signature> </DeleteObject>

Sample Response

<DeleteObjectResponse xmlns=""> <DeleteObjectResponse> <Code>200</Code> <Description>OK</Description> </DeleteObjectResponse> </DeleteObjectResponse>


  • Bucket: The bucket that holds the object.

  • Key: The key that identifies the object.

Access Control

You can delete an object only if you have WRITE access to the bucket, regardless of who owns the object or what rights are granted to it.

On this page: