Skip to main content

S3.Delete

Examples below assume this module is imported with an imports: entry under alias S3. Kind references (S3.Delete, S3.Bucket) follow that alias — if you import the module under a different name, substitute your alias accordingly.

Removes an object from a bucket declared as S3.Bucket. Invocable — invoke per request or inside a Run.Sequence step. Delete is idempotent: removing a key that does not exist still succeeds.


Example

kind: S3.Delete
metadata:
name: RemoveObject
bucketRef: !ref ModuleStore

Invoke inside a sequence:

- name: remove
invoke:
kind: S3.Delete
bucketRef: !ref ModuleStore
inputs:
key: "${{ inputs.objectKey }}"

Fields

FieldTypeRequiredDescription
bucketRefreferenceyesA !ref to an S3.Bucket resource — local (!ref ModuleStore) or imported (!ref Alias.ModuleStore).

Invocation inputs

InputTypeRequiredDescription
keystringyesObject key (path inside the bucket) to delete.

Output

FieldTypeDescription
keystringThe deleted object's key (echoed back).

Errors

CodeWhen
ERR_INVALID_REFERENCEbucketRef does not resolve to a live S3.Bucket at invoke time.