# S3 (/integrations/s3)





{/* MANUAL-CONTENT-START:intro */}

Use [Amazon S3](https://aws.amazon.com/s3/) to manage objects and buckets from a workflow. Upload, download, copy, or delete objects, inspect metadata, and create time-limited presigned URLs. Configure an AWS access key and secret access key.

{/* MANUAL-CONTENT-END */}

## Use the block [#usage-instructions]

Upload, download, copy, and delete objects (individually or in batches), inspect object metadata, generate time-limited presigned URLs, list bucket contents, and create, list, or delete buckets. Requires AWS access key and secret access key.

## Actions [#actions]

### S3 Put Object [#s3-put-object]

Upload a file to an AWS S3 bucket

<ReferenceDetails>
  #### Input [#input]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `accessKeyId` | string | Yes | Your AWS Access Key ID |
  | `secretAccessKey` | string | Yes | Your AWS Secret Access Key |
  | `region` | string | Yes | AWS region (e.g., us-east-1) |
  | `bucketName` | string | Yes | S3 bucket name (e.g., my-bucket) |
  | `objectKey` | string | Yes | Object key/path in S3 (e.g., folder/filename.ext) |
  | `file` | file | No | File to upload |
  | `content` | string | No | Text content to upload (alternative to file) |
  | `contentType` | string | No | Content-Type header (auto-detected from file if not provided) |
  | `acl` | string | No | Access control list (e.g., private, public-read) |

  #### Output [#output]

  | Parameter | Type | Description |
  | - | - | - |
  | `url` | string | URL of the uploaded S3 object |
  | `uri` | string | S3 URI of the uploaded object (s3://bucket/key) |
  | `metadata` | object | Upload metadata including ETag and location |
</ReferenceDetails>

### S3 Get Object [#s3-get-object]

Retrieve an object from an AWS S3 bucket

<ReferenceDetails>
  #### Input [#input-1]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `accessKeyId` | string | Yes | Your AWS Access Key ID |
  | `secretAccessKey` | string | Yes | Your AWS Secret Access Key |
  | `region` | string | No | Optional region override when URL does not include region (e.g., us-east-1, eu-west-1) |
  | `s3Uri` | string | Yes | S3 Object URL (e.g., [https://bucket.s3.region.amazonaws.com/path/to/file](https://bucket.s3.region.amazonaws.com/path/to/file)) |

  #### Output [#output-1]

  | Parameter | Type | Description |
  | - | - | - |
  | `url` | string | Pre-signed URL for downloading the S3 object |
  | `file` | file | Downloaded file stored in execution files |
  | `metadata` | object | File metadata including type, size, name, and last modified date |
</ReferenceDetails>

### S3 List Objects [#s3-list-objects]

List objects in an AWS S3 bucket

<ReferenceDetails>
  #### Input [#input-2]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `accessKeyId` | string | Yes | Your AWS Access Key ID |
  | `secretAccessKey` | string | Yes | Your AWS Secret Access Key |
  | `region` | string | Yes | AWS region (e.g., us-east-1) |
  | `bucketName` | string | Yes | S3 bucket name (e.g., my-bucket) |
  | `prefix` | string | No | Prefix to filter objects (e.g., folder/, images/2024/) |
  | `maxKeys` | number | No | Maximum number of objects to return (default: 1000) |
  | `continuationToken` | string | No | Token for pagination from previous list response |

  #### Output [#output-2]

  | Parameter | Type | Description |
  | - | - | - |
  | `objects` | array | List of S3 objects |
  | ↳ `key` | string | Object key |
  | ↳ `size` | number | Object size in bytes |
  | ↳ `lastModified` | string | Last modified timestamp |
  | ↳ `etag` | string | Entity tag |
  | `metadata` | object | Listing metadata including pagination info |
</ReferenceDetails>

### S3 Delete Object [#s3-delete-object]

Delete an object from an AWS S3 bucket

<ReferenceDetails>
  #### Input [#input-3]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `accessKeyId` | string | Yes | Your AWS Access Key ID |
  | `secretAccessKey` | string | Yes | Your AWS Secret Access Key |
  | `region` | string | Yes | AWS region (e.g., us-east-1) |
  | `bucketName` | string | Yes | S3 bucket name (e.g., my-bucket) |
  | `objectKey` | string | Yes | Object key/path to delete (e.g., folder/file.txt) |

  #### Output [#output-3]

  | Parameter | Type | Description |
  | - | - | - |
  | `deleted` | boolean | Whether the object was successfully deleted |
  | `metadata` | object | Deletion metadata |
</ReferenceDetails>

### S3 Copy Object [#s3-copy-object]

Copy an object within or between AWS S3 buckets

<ReferenceDetails>
  #### Input [#input-4]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `accessKeyId` | string | Yes | Your AWS Access Key ID |
  | `secretAccessKey` | string | Yes | Your AWS Secret Access Key |
  | `region` | string | Yes | AWS region (e.g., us-east-1) |
  | `sourceBucket` | string | Yes | Source bucket name (e.g., my-bucket) |
  | `sourceKey` | string | Yes | Source object key/path (e.g., folder/file.txt) |
  | `destinationBucket` | string | Yes | Destination bucket name (e.g., my-other-bucket) |
  | `destinationKey` | string | Yes | Destination object key/path (e.g., backup/file.txt) |
  | `acl` | string | No | Access control list for the copied object (e.g., private, public-read) |

  #### Output [#output-4]

  | Parameter | Type | Description |
  | - | - | - |
  | `url` | string | URL of the copied S3 object |
  | `uri` | string | S3 URI of the copied object (s3://bucket/key) |
  | `metadata` | object | Copy operation metadata |
</ReferenceDetails>

### S3 List Buckets [#s3-list-buckets]

List the S3 buckets owned by the authenticated AWS account

<ReferenceDetails>
  #### Input [#input-5]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `accessKeyId` | string | Yes | Your AWS Access Key ID |
  | `secretAccessKey` | string | Yes | Your AWS Secret Access Key |
  | `region` | string | Yes | AWS region to address the request to (e.g., us-east-1) |
  | `prefix` | string | No | Limit the response to bucket names that begin with this prefix |
  | `maxBuckets` | number | No | Maximum number of buckets to return (1-10000) |
  | `continuationToken` | string | No | Token for pagination from a previous list buckets response |

  #### Output [#output-5]

  | Parameter | Type | Description |
  | - | - | - |
  | `buckets` | array | List of S3 buckets owned by the account |
  | ↳ `name` | string | Bucket name |
  | ↳ `creationDate` | string | Bucket creation timestamp |
  | ↳ `region` | string | AWS region where the bucket is located |
  | `metadata` | object | Listing metadata including owner and pagination info |
</ReferenceDetails>

### S3 Head Object [#s3-head-object]

Retrieve metadata for an S3 object without downloading its body

<ReferenceDetails>
  #### Input [#input-6]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `accessKeyId` | string | Yes | Your AWS Access Key ID |
  | `secretAccessKey` | string | Yes | Your AWS Secret Access Key |
  | `region` | string | Yes | AWS region (e.g., us-east-1) |
  | `bucketName` | string | Yes | S3 bucket name (e.g., my-bucket) |
  | `objectKey` | string | Yes | Object key/path to inspect (e.g., folder/file.txt) |
  | `versionId` | string | No | Specific object version ID to inspect (for versioned buckets) |

  #### Output [#output-6]

  | Parameter | Type | Description |
  | - | - | - |
  | `exists` | boolean | Whether the object exists and was reachable |
  | `metadata` | object | Object metadata including size, content type, ETag, and last modified date |
</ReferenceDetails>

### S3 Create Bucket [#s3-create-bucket]

Create a new AWS S3 bucket in the specified region

<ReferenceDetails>
  #### Input [#input-7]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `accessKeyId` | string | Yes | Your AWS Access Key ID |
  | `secretAccessKey` | string | Yes | Your AWS Secret Access Key |
  | `region` | string | Yes | AWS region to create the bucket in (e.g., us-east-1) |
  | `bucketName` | string | Yes | Name for the new S3 bucket (must be globally unique) |
  | `acl` | string | No | Canned ACL for the bucket (e.g., private, public-read) |

  #### Output [#output-7]

  | Parameter | Type | Description |
  | - | - | - |
  | `metadata` | object | Created bucket metadata including name and location |
</ReferenceDetails>

### S3 Delete Bucket [#s3-delete-bucket]

Delete an empty AWS S3 bucket

<ReferenceDetails>
  #### Input [#input-8]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `accessKeyId` | string | Yes | Your AWS Access Key ID |
  | `secretAccessKey` | string | Yes | Your AWS Secret Access Key |
  | `region` | string | Yes | AWS region where the bucket is located (e.g., us-east-1) |
  | `bucketName` | string | Yes | Name of the S3 bucket to delete (must be empty) |

  #### Output [#output-8]

  | Parameter | Type | Description |
  | - | - | - |
  | `deleted` | boolean | Whether the bucket was successfully deleted |
  | `metadata` | object | Deletion metadata including bucket name |
</ReferenceDetails>

### S3 Presigned URL [#s3-presigned-url]

Generate a time-limited presigned URL to download or upload an S3 object

<ReferenceDetails>
  #### Input [#input-9]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `accessKeyId` | string | Yes | Your AWS Access Key ID |
  | `secretAccessKey` | string | Yes | Your AWS Secret Access Key |
  | `region` | string | Yes | AWS region where the bucket is located (e.g., us-east-1) |
  | `bucketName` | string | Yes | S3 bucket name (e.g., my-bucket) |
  | `objectKey` | string | Yes | Object key/path for the presigned URL (e.g., folder/file.txt) |
  | `method` | string | Yes | Operation the URL grants: get (download) or put (upload) |
  | `expiresIn` | number | No | URL validity in seconds (1-604800, default 3600) |
  | `contentType` | string | No | Content-Type the upload must use (only applies to put URLs) |

  #### Output [#output-9]

  | Parameter | Type | Description |
  | - | - | - |
  | `url` | string | The generated presigned URL |
  | `metadata` | object | Presigned URL metadata including method and expiration |
</ReferenceDetails>

### S3 Delete Objects [#s3-delete-objects]

Delete multiple objects from an AWS S3 bucket in a single batch request

<ReferenceDetails>
  #### Input [#input-10]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `accessKeyId` | string | Yes | Your AWS Access Key ID |
  | `secretAccessKey` | string | Yes | Your AWS Secret Access Key |
  | `region` | string | Yes | AWS region (e.g., us-east-1) |
  | `bucketName` | string | Yes | S3 bucket name (e.g., my-bucket) |
  | `keys` | json | Yes | Array of object keys to delete (e.g., \["a.txt", "folder/b.txt"]). Max 1000. |
  | `quiet` | boolean | No | Return only deletion errors, omitting successfully deleted keys |

  #### Output [#output-10]

  | Parameter | Type | Description |
  | - | - | - |
  | `deleted` | array | Objects that were successfully deleted |
  | ↳ `key` | string | Deleted object key |
  | ↳ `versionId` | string | Version ID of the deleted object |
  | ↳ `deleteMarker` | boolean | Whether a delete marker was created |
  | `errors` | array | Objects that failed to delete |
  | ↳ `key` | string | Object key that failed |
  | ↳ `code` | string | Error code |
  | ↳ `message` | string | Error message |
  | `metadata` | object | Batch deletion summary including counts |
</ReferenceDetails>
