s3_put_object
Upload text or base64 payloads to S3 (or S3-compatible storage).
Parameters
- bucketstringrequireddefault env S3_BUCKET
- Destination bucket name.
- keystringrequired
- Destination object key.
- contentstring
- Inline text payload for upload.
- source_keystring
- Read string payload from context key instead of
content. - source_pathstring
- Read upload payload from local file path.
- encodingstringdefault "text"
"text"or"base64"forcontent/source_key.- source_encodingstringdefault "text"
- Optional alias for
encoding. - content_typestringdefault "application/octet-stream"
- Optional
Content-Typemetadata. - regionstringdefault S3_REGION / AWS_REGION
- Explicit AWS/S3 region override.
- endpoint_urlstringdefault env AWS_ENDPOINT_URL
- Optional custom endpoint (for S3-compatible services).
- force_path_stylebooldefault false
- Force path-style bucket addressing.
- output_keystringdefault "s3"
- Prefix for context output keys.
One of content, source_key, or source_path is required.
Context Output
{output_key}_bucket— Target bucket.{output_key}_key— Object key written.{output_key}_content_type— Effective content type used.{output_key}_etag— Optional response ETag.{output_key}_version_id— Optional response version id.{output_key}_success—trueon success.
Example
local flow = Flow.new("s3_upload")
flow:step("upload", nodes.s3_put_object({
bucket = env("S3_BUCKET"),
key = "raw/temp/notes/sample.txt",
content = "Hello from IronFlow",
output_key = "upload"
}))
flow:step("show", nodes.log({
message = "Uploaded to ${ctx.upload_bucket}/${ctx.upload_key}"
})):depends_on("upload")
return flow