Skip to content

s3://

Amazon S3 producer + polling consumer. Built on aws-sdk-go-v2/service/s3 with the SDK's full credentials-chain support (env vars, IMDSv2, ECS task role, shared config, named profiles, static creds). Works with S3-compatible servers (MinIO, LocalStack, R2) via uriEndpointOverride + forcePathStyle.

URI shape

s3://<bucket>[/<key>]?region=us-east-1&operation=putObject

Defaults: operation=putObject, region from AWS_REGION env var or us-east-1, credentials from the SDK default chain.

Producer operations

operation What it does
putObject (default) Upload the In body. Use multiPartUpload=true for the SDK's manager.Uploader (chunked upload).
getObject Download the object keyed by HelixAwsS3Key header or the URI key.
deleteObject Delete by key.
copyObject Copy from URI key → HelixAwsS3DestinationKey header. Optional HelixAwsS3BucketName for cross-bucket.
listObjects Page through ListObjectsV2 with prefix/delimiter. Body becomes []string of keys.
headObject HEAD only — populates metadata headers, no body.
downloadLink Returns a presigned GET URL in the body + HelixAwsS3PresignedURL header. TTL = presignDuration (default 15m).
uploadLink Returns a presigned PUT URL.
createBucket Idempotent; honours policy + region LocationConstraint.
deleteBucket Delete the bucket.

autoCreateBucket=true runs createBucket before the first operation when the bucket is missing.

Parameters

Common

Param Type Default Description
bucketNameOrArn string from URI Bucket name or ARN.
region string us-east-1 AWS region.
prefix string — List/poll prefix filter.
delimiter string / ListObjectsV2 delimiter for pseudo-folder semantics.
forcePathStyle boolean false Use path-style addressing (LocalStack, MinIO).
uriEndpointOverride (alias endpoint) string — Custom S3 endpoint URL.
autoCreateBucket boolean false Idempotently create bucket on first use.
policy string — Bucket policy JSON applied on createBucket.

Server-side encryption

Param Type Description
useSSES3 boolean Enable SSE-S3 (AES-256, server-managed key).
useAwsKMS boolean Enable SSE-KMS. Pair with awsKMSKeyId.
awsKMSKeyId string KMS key ID/ARN.
useCustomerKey boolean Enable SSE-C. Pair with customerKeyId/customerKeyMD5/customerAlgorithm.

Producer

Param Type Default Description
operation enum putObject See table above.
keyName string — Default key (header HelixAwsS3Key overrides).
namingStrategy enum random random UUID or prefix from URI key.
storageClass enum — STANDARD/GLACIER/DEEP_ARCHIVE/INTELLIGENT_TIERING/etc.
multiPartUpload boolean false Use manager.Uploader for chunked upload.
partSize integer 5242880 Multipart part size (bytes).
bufferSize integer 1048576 Streaming buffer size.
streamingUploadMode boolean false Alias for multipart with auto sizing.
streamingUploadTimeout duration 5m Per-upload timeout.
conditionalWritesEnabled boolean false Wire If-Match/If-None-Match from exchange headers.
presignDuration duration 15m TTL on downloadLink/uploadLink URLs.

Consumer

Param Type Default Description
deleteAfterRead boolean false Delete each object after the route processes it.
moveAfterRead boolean false Copy each processed object into destinationBucket then delete source.
destinationBucket string — Target for moveAfterRead.
destinationBucketPrefix / destinationBucketSuffix string — Decoration when moving.
removePrefixOnMove boolean false Strip the source prefix when moving.
doneFileName string — Marker object; skip polls until present; delete after success.
fileName string — Suffix filter on keys.
includeBody boolean true Download object body into the exchange. Set false for metadata-only.
includeFolders boolean false Include zero-byte folder-marker keys.
maxMessagesPerPoll integer 0 Cap on objects dispatched per poll. 0 = unlimited.
sendEmptyMessageWhenIdle boolean false Emit a heartbeat Exchange on empty poll.

Polling scheduler

delay (default 500ms), initialDelay (1s), useFixedDelay, repeatCount, greedy, pollInterval (legacy alias).

Credentials

Param Type Description
accessKey / secretKey / sessionToken string Static credentials. When set, takes precedence over the default chain.
useDefaultCredentialsProvider boolean SDK default chain (env vars, IMDSv2, ECS task role, shared config). Default true when no explicit credentials.
useProfileCredentialsProvider boolean Load from a named profile in ~/.aws/config.
profileCredentialsName string Profile name.
trustAllCertificates boolean Skip TLS verification (testing only).

Headers

Header Direction
HelixAwsS3Key Both
HelixAwsS3BucketName Both
HelixAwsS3Operation Read (per-request override)
HelixAwsS3DestinationKey Read (copyObject)
HelixAwsS3ContentType / ContentLength / ContentEncoding / ContentDisposition / ContentMD5 / CacheControl Both
HelixAwsS3StorageClass Both
HelixAwsS3ETag / VersionId / LastModified Written on success
HelixAwsS3Metadata (map[string]string) Both
HelixAwsS3PresignedURL Written by downloadLink/uploadLink

Examples

Upload

- to: s3://my-bucket?region=us-east-1&autoCreateBucket=true
  # body: …bytes…  HelixAwsS3Key header set on the exchange

Download via presigned URL

- to: s3://my-bucket?operation=downloadLink&presignDuration=10m
  # body becomes the presigned URL; HelixAwsS3PresignedURL header too

Polling consumer that moves processed files

trigger:
  uri: s3://incoming?prefix=orders/&delay=5s&moveAfterRead=true&destinationBucket=processed&removePrefixOnMove=true
steps:
  - log:
      message: "Got ${headers.HelixAwsS3Key}"

See also

  • sqs:// — paired AWS sibling component.