Use these actions to list, retrieve, upload, and delete objects in Amazon S3 buckets.
Prerequisites
For prerequisites and credentials setup, see Set up AWS credentials.
List objects in a bucket
Action identifier: aws.s3.listObjectsV2
Returns some or all (up to 1,000) of the objects in a bucket with their metadata. It is the recommended version of listObjects.
Input | Type | Description | Example |
|---|---|---|---|
| String | Optional. IAM role ARN to assume for AWS API calls. |
|
| String | Optional. AWS access key ID. Pass as a secret. |
|
| String | Optional. AWS secret access key. Pass as a secret. |
|
| String | Optional. Temporary session token for STS authentication. Pass as a secret. |
|
| String | Required. AWS region of the target bucket. |
|
| String | Required. Name of the S3 bucket to list objects from. |
|
| String | Optional. Limits the response to keys that begin with this prefix. |
|
| Integer | Optional. Maximum number of keys to return (up to 1,000). |
|
| String | Optional. Token from a previous response to retrieve the next page of results. |
|
| Map | Optional. Additional boto3 parameters to pass to the API call. |
|
| List | Optional. JQ selectors to extract specific fields from the action output. |
|
Output | Type | Example |
|---|---|---|
| Object | See the list_objects_v2 boto3 reference. |
| Boolean |
|
| String |
|
name: aws-s3-list-objects-v2description: 'List Objects in an AWS S3 Bucket'steps: - name: aws_s3_listObjectsV2_1 type: action action: aws.s3.listObjectsV2 version: '1' inputs: awsRoleArn: "arn:aws:iam::123456789012:role/my-workflow-role" region: "us-east-2" bucket: "examplebucket" prefix: "path/to/folder/" maxKeys: 100 next: endDelete an object from a bucket
Action identifier: aws.s3.deleteObject
Permanently removes a single object from a bucket. For versioned buckets, this operation inserts a delete marker, which hides the object without permanently deleting it unless you specify a VersionId.
Input | Type | Description | Example |
|---|---|---|---|
| String | Optional. IAM role ARN to assume for AWS API calls. |
|
| String | Optional. AWS access key ID. Pass as a secret. |
|
| String | Optional. AWS secret access key. Pass as a secret. |
|
| String | Optional. Temporary session token for STS authentication. Pass as a secret. |
|
| String | Required. AWS region of the target bucket. |
|
| String | Required. Name of the S3 bucket containing the object. |
|
| String | Required. Full key (path) of the object to delete. |
|
| Map | Optional. Additional boto3 parameters to pass to the API call. |
|
| List | Optional. JQ selectors to extract specific fields from the action output. |
|
Output | Type | Example |
|---|---|---|
| Object | See the delete_object boto3 reference. |
| Boolean |
|
| String |
|
name: aws-s3-delete-objectdescription: 'Delete an AWS S3 Object'steps: - name: aws_s3_deleteObject_1 type: action action: aws.s3.deleteObject version: '1' inputs: awsRoleArn: "arn:aws:iam::123456789012:role/my-workflow-role" region: "us-west-2" bucket: "my-bucket" key: "path/to/object.txt" next: endAdd an object to a bucket
Action identifier: aws.s3.putObject
Adds an object to a bucket. Amazon S3 is a distributed system — if it receives multiple write requests for the same object simultaneously, it overwrites all but the last object written.
Input | Type | Description | Example |
|---|---|---|---|
| String | Optional. IAM role ARN to assume for AWS API calls. |
|
| String | Optional. AWS access key ID. Pass as a secret. |
|
| String | Optional. AWS secret access key. Pass as a secret. |
|
| String | Optional. Temporary session token for STS authentication. Pass as a secret. |
|
| String | Required. AWS region of the target bucket. |
|
| String | Required. Name of the S3 bucket to upload the object to. |
|
| String | Required. Full key (path) for the object in the bucket. |
|
| String | Required. The object data to upload. |
|
| String | Required. Standard MIME type of the object. |
|
| String | Optional. URL-encoded tag set to apply to the object. |
|
| Map | Optional. Additional boto3 parameters to pass to the API call. |
|
| List | Optional. JQ selectors to extract specific fields from the action output. |
|
Output | Type | Example |
|---|---|---|
| Object | See the put_object boto3 reference. |
| Boolean |
|
| String |
|
name: s3-put-objectdescription: 'Put an AWS S3 Object'steps: - name: aws_s3_putObject_1 type: action action: aws.s3.putObject version: '1' inputs: awsRoleArn: "arn:aws:iam::123456789012:role/my-workflow-role" region: "us-east-2" bucket: "examplebucket" key: "path/to/object.txt" body: "Hello world" contentType: "plain/text" tagging: "key1=value1" next: endRetrieve an object from a bucket
Action identifier: aws.s3.getObject
Retrieves an object from Amazon S3. Specify the full key name for the object in the request.
Important
This action fails if the object is larger than 100 KB.
Input | Type | Description | Example |
|---|---|---|---|
| String | Optional. IAM role ARN to assume for AWS API calls. |
|
| String | Optional. AWS access key ID. Pass as a secret. |
|
| String | Optional. AWS secret access key. Pass as a secret. |
|
| String | Optional. Temporary session token for STS authentication. Pass as a secret. |
|
| String | Required. AWS region of the target bucket. |
|
| String | Required. Name of the S3 bucket containing the object. |
|
| String | Required. Full key (path) of the object to retrieve. |
|
| String | Optional. Version ID of the object to retrieve. If omitted, the current version is returned. |
|
| String | Optional. HTTP range header to retrieve a specific byte range of the object. |
|
| Map | Optional. Additional boto3 parameters to pass to the API call. |
|
| List | Optional. JQ selectors to extract specific fields from the action output. |
|
Output | Type | Example |
|---|---|---|
| Object | See the get_object boto3 reference. |
| Boolean |
|
| String |
|
name: s3-get-objectdescription: 'Get an AWS S3 Object'steps: - name: aws_s3_getObject_1 type: action action: aws.s3.getObject version: '1' inputs: awsRoleArn: "arn:aws:iam::123456789012:role/my-workflow-role" region: "us-east-2" bucket: "examplebucket" key: "path/to/object.txt" next: end