Write S3 object
Uploads or replaces one bounded file at an exact S3-compatible object key.
@lainstack/s3/write-object · Object storage
How to use it
Section titled “How to use it”Write S3 object uploads one file to an exact key in an S3-compatible bucket. It takes a run file, for example from @lainstack/s3/read-object or an upload field. It does not create content from text or data.
This block overwrites. If the key already exists, the new file replaces the object with no check. A test run does not make it side-effect free, so confirm with the user before test-running a draft that contains it. To remove an object, use @lainstack/s3/delete-object.
Traps:
- The file must be at most 5 MiB, or the step fails. An upload field that holds more than one file, or none, fails. Limit the field to one file.
- Check
outcome. It isuploadedoroutcome_unknown. Withoutcome_unknownthe step still succeeds and the object may or may not exist. Do not treat the step as proof of upload. - The file’s content type is sent when the file has one.
- The key is exact and relative to the connection’s configured prefix. It cannot start with
http://,https://,s3://orarn:. sizeis the number of bytes sent.
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 |
| Size | size |
Number |
| Outcome | outcome |
Text |