Skip to main content

AWS S3

Type ID: s3  ·  Kind: Action  ·  Trace: TOOL

Interact with AWS S3 to upload and retrieve objects.

Credentials

aws

Resources & operations

  • Object (object)
    • Upload (upload) — Upload an object to S3
    • Get (get) — Get an object from S3

Properties

Common

PropertyKeyTypeRequiredDefaultPossible valuesShown when
ResourceresourceoptionsYesobjectObject (object)
OperationoperationoptionsYesuploadUpload (upload), Get (get)resource = object

Object → Upload

PropertyKeyTypeRequiredDefaultPossible valuesShown when
Bucket NamebucketNamestringYes''S3 bucket nameresource = object, operation = upload
Object KeyobjectKeystringYes''S3 object keyresource = object, operation = upload
Binary Property NamebinaryPropertyNamestringYesdataName of the binary property containing the file data to uploadresource = object, operation = upload

Object → Get

PropertyKeyTypeRequiredDefaultPossible valuesShown when
Bucket NamebucketNamestringYes''S3 bucket nameresource = object, operation = get
Object KeyobjectKeystringYes''S3 object keyresource = object, operation = get
Binary Property NamebinaryPropertyNamestringYesdataName of the binary property to write the downloaded file data toresource = object, operation = get
Return Binary DatareturnBinaryDatabooleanNotruetrue / false (include downloaded file as binary data in output)resource = object, operation = get
Generate Download URLgenerateDownloadUrlbooleanNofalsetrue / false (generate a temporary presigned download URL)resource = object, operation = get
Download URL Expiration SecondsdownloadUrlExpiresInnumberNo3600How long the generated download URL stays valid (1–604800 seconds)resource = object, operation = get, generateDownloadUrl = true

Notes

  • Requires an aws credential; the credential ID is read from credentials.id. A missing ID throws AWS credential ID is required. The resolved credential must include accessKeyId, secretAccessKey, and region, otherwise AWS credentials must include accessKeyId, secretAccessKey, and region is thrown.
  • Uses the AWS SDK (@aws-sdk/client-s3); an S3Client is constructed per execution from the resolved region and access keys. Commands honor context.executionControls.abortSignal.
  • Upload reads the first input item's binary property (binaryPropertyName, base64), decodes it, and sends a PutObjectCommand with the binary's mimeType as ContentType. Throws if there are no input items, no binary for the property, or no base64 data. Output: { success: true, bucket, key, url }, where url is the public object URL https://{bucket}.s3.{region}.amazonaws.com/{key}.
  • Get: when generateDownloadUrl is true, a presigned GetObjectCommand URL is produced via @aws-sdk/s3-request-presigner with an attachment Content-Disposition; downloadUrlExpiresIn must be between 1 and 604800 seconds or it throws. When returnBinaryData is false, only a HeadObjectCommand runs and the JSON result is returned (no binary). When true, a GetObjectCommand downloads the body, rejecting objects larger than the 10 MB binary file size limit (MAX_BINARY_FILE_SIZE_BYTES), and the bytes are attached under binary[binaryPropertyName] (base64 data, mimeType, fileName, fileSize). Output JSON: { success: true, bucket, key, url, [downloadUrl, downloadUrlExpiresIn] }.