This page provides a reference for AWS S3 actions available in the workflow automation actions catalog. Use these actions to list, retrieve, upload, and delete objects in Amazon S3 buckets.
Prerequisites
Before using AWS actions in workflow automation, ensure you have:
- An AWS account with appropriate permissions.
- AWS credentials configured (IAM user credentials, IAM role ARN, or session credentials).
- The necessary IAM permissions for the specific AWS services you plan to use.
See Set up AWS credentials for information on how to create IAM users and IAM roles, and set up static and session AWS credentials for integration with workflow automation AWS actions.
List objects in a bucket
The action identifier is 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.
The following table describes the input fields for this action.
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. |
|
Additional optional boto3 fields (EncodingType, FetchOwner, StartAfter, RequestPayer, ExpectedBucketOwner, OptionalObjectAttributes, Delimiter) are available via the parameters input. See the list_objects_v2 boto3 reference for details.
The following table describes the output fields for this action.
Output | Type | Example |
|---|---|---|
| Object | See the list_objects_v2 boto3 reference. |
| Boolean |
|
| String |
|
Example workflow
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
The action identifier is 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 a VersionId is specified.
The following table describes the input fields for this action.
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. |
|
Additional optional boto3 fields (RequestPayer, BypassGovernanceRetention, ExpectedBucketOwner, IfMatch, VersionId, MFA) are available via the parameters input. See the delete_object boto3 reference for details.
The following table describes the output fields for this action.
Output | Type | Example |
|---|---|---|
| Object | See the delete_object boto3 reference. |
| Boolean |
|
| String |
|
Example workflow
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
The action identifier is 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.
The following table describes the input fields for this action.
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. |
|
Additional optional boto3 fields are available via the parameters input. See the put_object boto3 reference for the complete list.
The following table describes the output fields for this action.
Output | Type | Example |
|---|---|---|
| Object | See the put_object boto3 reference. |
| Boolean |
|
| String |
|
Example workflow
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
The action identifier is 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.
The following table describes the input fields for this action.
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. |
|
Additional optional boto3 fields are available via the parameters input. See the get_object boto3 reference for the complete list.
The following table describes the output fields for this action.
Output | Type | Example |
|---|---|---|
| Object | See the get_object boto3 reference. |
| Boolean |
|
| String |
|
Example workflow
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