Delete S3 object
Deletes one exact S3-compatible object key.
@lainstack/s3/delete-object · Object storage
How to use it
Section titled “How to use it”Delete S3 object deletes one object by its exact key. It cannot delete by prefix, pattern or list. To remove several objects, find keys with @lainstack/s3/list-objects and run this block once per key with @lainstack/flow/for-each-item.
This block changes remote data and has no undo from this block. A test run does not make it side-effect free, so confirm with the user before test-running a draft that contains it. Put an approval step before it when a person should confirm the key (use @lainstack/flow/approval).
Traps:
- Check
outcome. It isdelete_acceptedoroutcome_unknown. Withoutcome_unknownthe step still succeeds and the object may still exist. delete_acceptedmeans the storage service accepted the request. The block does not check that the object existed or that it is now gone.- The key is exact and relative to the connection’s configured prefix. It cannot start with
http://,https://,s3://orarn:. bucketis optional. Set it only when the connection does not already select one.
Settings
Section titled “Settings”| Setting | Key | Type | Details |
|---|---|---|---|
| S3-compatible connection (required) | credentialId |
Connection | Uses the selected S3-compatible object-storage connection. At most 255 characters. |
| Bucket | bucket |
Text | Optional exact bucket when the connection does not already select one. Keys are relative to the configured connection prefix. |
| Object key (required) | key |
Text | Exact object key, relative to the configured connection prefix. |
Outputs
Section titled “Outputs”| Output | Path | Type |
|---|---|---|
| Object key | key |
Text |
| Outcome | outcome |
Text |