download free 30 days trial version buy bucket explorer
Documentation  Download  Purchase  Support  FAQs   Forum   ScreenShots & Demos

Delete Single Amazon S3 Object Per Request (DELETE Object)

You can Delete an Amazon S3 Object , by sending HTTP DELETE Request to Amazon S3 Server. With the DELETE Request, Amazon S3 removes the null version of the S3 Object (if there is one) and insert a Delete Marker, which becomes the latest version of the S3 Object at that point. When someone requests a GET on that S3 Object, Amazon S3 returns a 404 errror.

Amazon S3 does not remove any object if there is no null version of the Object available. To authenticate the request, you must be a valid registered AWS account holder.

To remove a specific version of an AMazon S3 Object, you will require to pass the versionid of the Object, which in turn, permanently deletes the S3 Object. You must be the owner of the Amazon S3 Bucket where the Object is stored, to be able to delete object versions permanently.

You can send DELETE Request to S3 Server in two ways:

  1. Write your software code to use Amazon S3 REST API - DELETE Object - You can read more about SOAP APIs on AWS Documentation site.
  2. Delete S3 Objects using Bucket Explorer UI - You can delete Objects with mouse clicks using Bucket Explorer.

Delete S3 Object using Amazon REST API

To delete an object, you have to request DELETE Object. You need to be the Bucket owner and must use the versioned subresource to remove a specific version of the Object.

In case the object that you want to delete is in a Bucket in which the Bucket versioning configuration is MFA delete enabled, you need to include x-amz-mfa request header in the request and must use HTTPS.

You can delete the object by calling the DELETE Object API. Or you can also configure its lifecycle to enable Amazon S3 to remove the objects.

You can also block users or accounts from deleting objects from your Bucket by denying them.

Syntax:


DELETE / ObjectName HTTP/1.1
Host: < BucketName >.s3.amazonaws.com
Date: currentdate
Content-Length: length
Authorization: signatureValue

Delete an Object using Bucket Explorer

The "DELETE Object" API of AWS allows you to delete an object in a Bucket by writing code but Bucket Explorer with REST API lets you do that easily and more conveniently with mouse clicks.
With Bucket Explorer, you have two options to delete an object.
  1. Object Delete
  2. Quick Delete (Batch Delete API)

Note: Click on the link to know more about Quick Delete (Batch Delete API) .

Object Delete

Here are the steps to delete file(s) from a Bucket:

  1. Select the Bucket from which you want to delete file(s) and folder(s).
  2. Select the file(s) and folder(s) that you want to delete..
  3. There are two options to delete file(s) and folder(s).
    1. Right click on object listing table and choose "Delete" -> "Delete File(s)" option.
    2. Click on File -> Delete icon from the shortcut menu located at object toolbar.
  4. After you click on any of the two options above, you will be prompted with a message "Are you sure you want to delete 2 item(s)" (if user selects 2 items) with two options:
    1. Move to Trash.
    2. Don’t Delete.
  5. If you click on "Move to Trash" or "Delete Permanently" , deletion process will start in queue.

Case:

In case of Amazon S3 versioning set on the Bucket whose objects you are deleting, the option “Move to Trash” option will be changed to “Delete Permanently.