S3 API Documentation

×
×
Home > S3 Developer Guide > Operations > Delete Multiple Objects

Delete Multiple Objects

jQuery(document).attr(“title”, “Welcome to Sterling Kilgore | Results Beyond Words”);

The sample code in this section shows how to delete multiple objects, object1, object2, object3, from a bucket my-bucket, at once from your storage. The following is an example for IDrive® e2’s Chicago region.

Follow the required configuration instructions then follow the steps below to delete multiple objects.

In order to delete multiple objects,

  1. Create a json file containing all objects to be deleted. An example is provided below:


  2. $ vi delete.json { "Objects": [ { "Key": "object1" }, { "Key": "object2" }, { "Key": "object3" } ], "Quiet": false }
  3. Provide this file as input using the command below:


    aws s3api delete-objects --bucket my-bucket --delete file://delete.json --endpoint-url https://storageendpoint

 

© 2024 IDrive Inc.