Skip to main content

AWS S3 ExecModule

Overview

AwsS3Module connects ValkyrAI workflows to Amazon Simple Storage Service through the bundled AWS SDK v2 client. It covers the high-value bucket and object behaviors represented by n8n's built-in AWS S3 node while following ValkyrAI's native map I/O ABI, IntegrationAccount security, annotation-backed discovery, bounded payloads, and explicit destructive-action controls.

The connector implements nine operations:

  • buckets: list_buckets, head_bucket, create_bucket, delete_bucket
  • objects: list_objects, head_object, get_object, put_object, delete_object

AWS credentials, service routing, retry boundaries, and response limits cannot be overridden through mapped workflow input. The module contacts only the AWS S3 endpoint selected by the validated AWS region.

Usage

  1. Create a dedicated AWS IAM principal for the exact buckets and operations the workflow needs.
  2. Store its access key ID and secret access key in an AWS IntegrationAccount, verify the account, and keep it in READY status.
  3. Add AwsS3Module to a workflow and bind the account through ExecModuleConfig.authConfig.integrationAccount.
  4. Set operation, region, and the operation-specific bucket, key, or content fields.
  5. Preserve returned AWS request IDs and immutable object identifiers when reconciling ambiguous provider outcomes.

Do not put AWS credentials in workflow input, module parameters, logs, examples, or object metadata. Raw credential-like inputs are rejected before provider access.

Inputs

NameTypeRequired forDefaultConstraints
operationstringEvery executionNoneOne of the nine documented operations.
regionstringEvery executionNoneAWS region syntax such as us-west-2.
bucketstringEvery operation except list_bucketsNoneDNS-compatible S3 bucket name, 3–63 characters; IPv4-shaped names are rejected.
keystringObject operations except list_objectsNoneNon-empty object key, at most 1,024 characters, without a leading or trailing slash.
prefixstringOptional list_objects filterNoneUp to 1,024 characters.
continuationTokenstringOptional list_objects resume pointNoneOpaque provider token, at most 4,096 characters.
limitintegerList operations1001–10,000 returned items. Each S3 page remains at most 1,000 objects.
returnAllbooleanlist_objectsfalseFollows provider pages until exhaustion or limit.
contentTextstringput_object, unless base64 is usedNoneUTF-8 content; mutually exclusive with contentBase64.
contentBase64stringput_object, unless text is usedNoneValid base64; mutually exclusive with contentText.
contentTypestringOptional put_object media typeNoneSingle-line value, at most 255 characters.
metadataobjectOptional put_object metadata{}Up to 25 lowercase portable names and single-line values; secret-like names are rejected.
maxDownloadBytesintegerget_object10485761 byte through 5 MiB. A metadata read checks the declared length before download.
confirmOverwritebooleanIntentional replacement by put_objectfalseWhen false, the request uses S3 create-only If-None-Match: * semantics.
confirmDeletebooleandelete_bucket, delete_objectfalseMust be true because deletion can permanently remove data.

Outputs

Every execution returns stable status, operation, and attempts fields.

NameTypeWhen presentDescription
statusstringAlwayssuccess or error.
operationstringAlwaysNormalized operation.
attemptsintegerAlwaysProvider calls, including safe-read retries and pages.
dataobjectSingle-resource or mutation successNormalized bucket/object metadata or a stable mutation receipt.
itemsarrayList successBounded buckets or objects.
countintegerList successNumber of returned items.
hasMorebooleanList successWhether another provider page exists.
nextContinuationTokenstringAnother object page existsOpaque ListObjectsV2 continuation for a later execution.
contentBase64stringget_object successBounded downloaded bytes encoded as base64.
contentBytesintegerget_object or put_object successDownloaded or uploaded byte count.
requestIdstringAWS supplies oneBounded request reference for provider support and reconciliation.
errorobjectFailureSafe {code, message, httpStatus?, retryable} details.

AWS access keys, secret keys, provider exception text, and unbounded response bodies are never returned.

IntegrationAccount Requirements

Bind exactly one AWS IntegrationAccount through the normalized ExecModule authentication relationship:

FieldRequirement
ProviderAmazon Web Services / S3
statusMust be READY.
verifiedMust be true.
apiKey SecureFieldAWS access key ID.
password SecureFieldAWS secret access key.

Use the least-privilege IAM actions required by selected operations. Typical mappings are:

  • s3:ListAllMyBuckets for list_buckets
  • s3:ListBucket and s3:GetBucketLocation for bucket and object listing/read preparation
  • s3:CreateBucket for create_bucket
  • s3:DeleteBucket for delete_bucket
  • s3:GetObject for head_object and get_object
  • s3:PutObject for put_object
  • s3:DeleteObject for delete_object

Restrict resources to approved buckets and prefixes wherever AWS policy semantics allow it. The current module supports a long-lived access-key pair. Temporary session credentials, role assumption, custom endpoints, and caller-supplied credentials are intentionally deferred.

Configuration

The awsAccount relationship is the only credential configuration. Operation, region, and resource fields belong in module parameters or mapped input; retry limits use the normalized retry policy.

{
"version": "1.0.0",
"authConfig": {
"authStrategy": 1,
"integrationAccount": "integration-account:aws-s3-release-artifacts"
},
"retryPolicy": {
"maxAttempts": 3
},
"payloadConfig": {
"parameters": "{\"operation\":\"list_objects\",\"region\":\"us-west-2\",\"bucket\":\"company-release-artifacts\",\"prefix\":\"releases/\",\"limit\":100}"
}
}

The relationship value is illustrative. Persisted workflows bind the generated IntegrationAccount relationship, never plaintext credentials.

Operations

OperationProvider behaviorSide effect and retry behavior
list_bucketsLists and alphabetizes visible buckets, then applies limit.Read-only; transient failures are retried.
head_bucketVerifies that a bucket exists and is accessible.Read-only; transient failures are retried.
create_bucketCreates one bucket in the validated region.External write; one provider attempt.
delete_bucketDeletes one empty bucket.Destructive; requires confirmDelete=true; one provider attempt.
list_objectsUses ListObjectsV2 with optional prefix and opaque continuation.Read-only; each page can retry independently; bounded at 10,000 results.
head_objectReads object metadata without downloading the body.Read-only; transient failures are retried.
get_objectReads metadata, enforces maxDownloadBytes, then downloads and base64-encodes the object.Read-only; metadata and body calls can retry independently.
put_objectUploads bounded UTF-8 or base64 bytes with optional content type and metadata.External write; one provider attempt; create-only unless overwrite is confirmed.
delete_objectDeletes one object key.Destructive; requires confirmDelete=true; one provider attempt.

Errors and Failure Modes

CodeTypical causeRetryableResolution
VALIDATION_ERRORMissing/invalid region, bucket, key, payload, metadata, limit, or confirmation.NoCorrect the named input; no unsafe request was sent.
UNSUPPORTED_OPERATIONUnknown operation.NoSelect a documented operation.
INTEGRATION_ACCOUNT_ERRORAccount missing, unverified, not READY, or missing key material.NoRepair and bind the AWS account.
AWS_S3_HTTP_400Invalid AWS request or bucket-region mismatch.NoVerify region, bucket, key, and payload.
AWS_S3_HTTP_403IAM or bucket policy denies access.NoGrant only the missing action/resource permission.
AWS_S3_HTTP_404Bucket or object is absent or invisible.NoVerify the immutable bucket/key.
AWS_S3_HTTP_409Bucket conflict, non-empty delete, or create collision.NoRead current provider state and reconcile.
AWS_S3_HTTP_412Create-only upload found an existing key.NoChoose a new key or deliberately set confirmOverwrite=true.
AWS_S3_HTTP_429 / 503S3 throttling or transient service pressure.Yes for readsHonor retry guidance; writes remain single-attempt and require reconciliation.
NETWORK_ERRORDNS, TLS, timeout, or connectivity failure.Yes for readsVerify connectivity and retry a safe read. Reconcile writes before replay.
EXECUTION_ERRORUnexpected bounded runtime failure.No automatic write retryPreserve the request ID and reconcile provider state.

Provider error text is not copied into output, preventing credential echoes and unbounded error payloads.

Example

Upload a create-only JSON release manifest:

{
"operation": "put_object",
"region": "us-west-2",
"bucket": "company-release-artifacts",
"key": "releases/2026-08-16/manifest.json",
"contentText": "{\"status\":\"approved\",\"release\":\"2026-08-16\"}",
"contentType": "application/json",
"metadata": {
"release": "2026-08-16",
"workflow": "approved-publication"
}
}

Expected result shape:

{
"status": "success",
"operation": "put_object",
"attempts": 1,
"requestId": "aws-request-reference",
"data": {
"bucket": "company-release-artifacts",
"key": "releases/2026-08-16/manifest.json",
"contentBytes": 52,
"overwriteAllowed": false,
"etag": "provider-etag"
}
}

Notes

  • Pagination: list_objects uses opaque ListObjectsV2 continuations. returnAll=true follows pages only to the fixed AWS S3 destination and stops at limit or 10,000 objects.
  • Rate limits: HTTP 408, 429, 500, 502, 503, and 504 plus network failures can retry for read-only operations, bounded by RetryPolicy.maxAttempts from 1 through 5. AWS SDK retries are disabled so writes are exactly one provider attempt.
  • API limits: one execution uploads or downloads at most 5 MiB. Multipart upload, ranged download, object tagging, ACL mutation, bucket policy, version listing, batch delete, presigned URLs, S3-compatible custom endpoints, Glacier restore, and event notification configuration are deferred.
  • Idempotency: put_object uses If-None-Match: * unless confirmOverwrite=true. Creates and deletes have no caller idempotency key; after any ambiguous provider response, reconcile by bucket/key and request ID before replaying.
  • Destructive behavior: bucket and object deletion require explicit confirmation and are never automatically retried. Versioned buckets may retain prior object versions according to AWS configuration.
  • Data handling: object content is classified as confidential and sent only to the selected AWS S3 region endpoint. Secret-like metadata names are rejected.
  • Provider verification boundary: deterministic tests cover validation, credential isolation, request mapping, pagination, retry boundaries, output normalization, redaction, and discovery. Live AWS behavior remains unverified until an authorized S3 credential and reviewed test bucket are supplied.
  • Functional reference: n8n's current AWS S3 connector models bucket and object create/list/read/upload/delete operations with AWS credentials and ListObjectsV2 pagination. ValkyrAI adds fixed routing, verified IntegrationAccount enforcement, create-only upload by default, bounded content, explicit deletion confirmation, safe output normalization, and read-only retries.
  • Runtime boundary: merged source and published documentation do not update the deployed Workflow Studio catalog until a ValkyrAI backend release exposes AwsS3Module through /v1/modules/metadata.