Skip to main content

Amazon S3: Delete File

Description

Amazon S3: Delete file plugin step, deletes a file from a bucket on Amazon S3. To delete an object there are two available options:

  • Delete an object with a specific version by specifying a version ID. S3 bucket versioning should be ‘enabled’.
  • Delete an object without specifying a version ID, in which case S3 adds a delete marker to the object.
Note:

The operation can be performed by the owner of the bucket. If Bucket Versioning is not enabled, there is no way to restore the deleted object.

Known issues

If non-existing file is given in Key Name field, it will create the file with Delete marker.

References

Configurations

Field NameDescription
Step NameSpecify a unique name for the step.
Connection tab:For the Amazone S3 connection fields details, click Common Tab: Connection Fields
INPUT tab:Input fields
Bucket NameSpecify the name of the S3 bucket from which the object is to be deleted.
The field type is String. This field is mandatory.
GetClick the button to populate the list of available Buckets.
Key NameThe object name that is to be deleted. It deletes a single file. If the file resides in any folder, it should be given as “foldername/filename.extension”.
The field type is String. This field is mandatory.
Version IDThe specific version ID of the object to be deleted. Bucket versioning should be enabled.
Notes:
  • The Key Name field is the Object’s Key name.
  • To delete an object of a specific version, S3 bucket versioning should be enabled.
  • Bucket versioning notes:
    1. For Files - i. When versioning is disabled, then objects will be permanently deleted. ii. When versioning is enabled, a simple DELETE cannot permanently delete an object. Instead, Amazon S3 inserts a delete marker in the bucket, and that marker becomes the current version of the object with a new ID. To delete versioned objects permanently, the version ID field value should be provided (If version ID is null, provide ‘null’ value in version ID field). iii. When versioning is suspended for a bucket, then for a DELETE request:
      • It only removes objects with version ID is null.
      • It does not remove anything if there is not a null version of the object in the bucket. iv. Inserts a delete marker into the bucket. v. Amazon S3 inserts a delete marker in its place with a version ID of null.
  • Specify a versioned delete request — specify both the key and a version ID. In this case, the following two outcomes are possible: i. If the version ID maps to a specific object version, Amazon S3 deletes the specific version of the object. ii. If the version ID maps to the delete marker of that object, Amazon S3 deletes the delete marker. This makes the object reappear in your bucket.
  • Once the object is deleted using the plugin step and the workflow is re-run, the workflow will be successful.
  • "The key must be specified when deleting a version" error may occur due to following reasons: i. The provided version ID does not exist. ii. The provided version ID is not associated to the provided Key Name.