Skip to main content

Amazon S3 Component

Manage files within an Amazon (AWS) S3 bucket

Component key: aws-s3

Description#

Amazon S3 is a file storage solution from Amazon Web Services. The Amazon S3 component allows you to create, read, update, move, list or delete objects (files) within an Amazon S3 bucket.

A common integration pattern involves listing files in a file store, and performing a series of actions on the array of files that are returned. See our looping over files quickstart for information about how to create a loop over an array of files.

Amazon S3 Connections#

AWS API Key and Secret#

An AWS IAM access key pair is required to interact with Amazon S3. Make sure that the key pair you generate in AWS has proper permissions to the S3 resources you want to access. Read more about S3 IAM actions in the AWS docs.

InputNotesExample
Input
Access Key ID
string
/ Required
Notes
An AWS IAM Access Key ID
Example
AKIAIOSFODNN7EXAMPLE
Input
Secret Access Key
password
/ Required
Notes
An AWS IAM Secret Access Key
Example
wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

Actions#

Copy Object#

Copy an object in S3 from one location to another | key: copyObject

InputDefaultNotesExample
Input
AWS Access Key
connection
/ Required
Default
 
Notes
Access keys provide programmatic access to access resources in AWS. See https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html.
Example
 
Input
AWS Region
string
/ Required
Default
us-east-1
Notes
AWS provides services in multiple regions, like us-west-2 or eu-east-1. AWS region indicates the region in which your bucket(s) are stored.
Example
us-east-1
Input
Destination Bucket Name
string
/ Required
Default
 
Notes
An Amazon S3 'bucket' is a container where files are stored. The destination bucket indicates the bucket where you want a file to be stored. If you are copying files within a single bucket, list the same bucket as the source and destination bucket.
Example
my-destination-bucket
Input
Destination Key
string
/ Required
Default
 
Notes
An object in S3 is a file that is saved in a 'bucket'. This represents the destination object's key (file path). Do not include a leading /.
Example
path/to/destination/file.txt
Input
Source Bucket Name
string
/ Required
Default
 
Notes
An Amazon S3 'bucket' is a container where files are stored. The source bucket indicates the bucket containing the file you want to copy. If you are copying files within a single bucket, list the same bucket as the source and destination bucket.
Example
my-source-bucket
Input
Source Key
string
/ Required
Default
 
Notes
An object in S3 is a file that is saved in a 'bucket'. This represents the source object's key (file path). Do not include a leading /.
Example
path/to/source/file.txt

Output Example Payload#

{  "data": {    "CopyObjectResult": {      "ETag": "Example",      "LastModified": "2020-01-01T00:00:00.000Z"    }  }}

Delete Object#

Delete an Object within an S3 Bucket | key: deleteObject

InputDefaultNotesExample
Input
AWS Access Key
connection
/ Required
Default
 
Notes
Access keys provide programmatic access to access resources in AWS. See https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html.
Example
 
Input
AWS Region
string
/ Required
Default
us-east-1
Notes
AWS provides services in multiple regions, like us-west-2 or eu-east-1. AWS region indicates the region in which your bucket(s) are stored.
Example
us-east-1
Input
Bucket Name
string
/ Required
Default
 
Notes
An Amazon S3 'bucket' is a container where files are stored. You can create a bucket from within the AWS console. Bucket names contain only letters, numbers, and dashes.
Example
my-s3-bucket-abc123
Input
Object Key
string
/ Required
Default
 
Notes
An object in S3 is a file that is saved in a 'bucket'. This represents the object's key (file path). Do not include a leading /.
Example
path/to/file.txt

Output Example Payload#

{  "data": {    "DeleteMarker": true,    "VersionId": "3/L4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo",    "RequestCharged": "requestor"  }}

Get Object#

Get the contents of an object | key: getObject

InputDefaultNotesExample
Input
AWS Access Key
connection
/ Required
Default
 
Notes
Access keys provide programmatic access to access resources in AWS. See https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html.
Example
 
Input
AWS Region
string
/ Required
Default
us-east-1
Notes
AWS provides services in multiple regions, like us-west-2 or eu-east-1. AWS region indicates the region in which your bucket(s) are stored.
Example
us-east-1
Input
Bucket Name
string
/ Required
Default
 
Notes
An Amazon S3 'bucket' is a container where files are stored. You can create a bucket from within the AWS console. Bucket names contain only letters, numbers, and dashes.
Example
my-s3-bucket-abc123
Input
Object Key
string
/ Required
Default
 
Notes
An object in S3 is a file that is saved in a 'bucket'. This represents the object's key (file path). Do not include a leading /.
Example
path/to/file.txt

Output Example Payload#

{  "data": {    "type": "Buffer",    "data": [      69,      120,      97,      109,      112,      108,      101    ]  },  "contentType": "application/octet"}

List Objects#

List Objects in a Bucket | key: listObjects

InputDefaultNotesExample
Input
AWS Access Key
connection
/ Required
Default
 
Notes
Access keys provide programmatic access to access resources in AWS. See https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html.
Example
 
Input
AWS Region
string
/ Required
Default
us-east-1
Notes
AWS provides services in multiple regions, like us-west-2 or eu-east-1. AWS region indicates the region in which your bucket(s) are stored.
Example
us-east-1
Input
Bucket Name
string
/ Required
Default
 
Notes
An Amazon S3 'bucket' is a container where files are stored. You can create a bucket from within the AWS console. Bucket names contain only letters, numbers, and dashes.
Example
my-s3-bucket-abc123
Input
ContinuationToken
string
Default
 
Notes
Specify the pagination token that's returned by a previous request to retrieve the next page of results
Example
lslTXFcbLQKkb0vP9Kgh5hy0Y0OnC7Z9ZPHPwPmMnxSk3eiDRMkct7D8E
Input
Max Keys
string
Default
 
Notes
Provide an integer value for the maximum amount of items that will be returned. Provide a value from 1 to 1000.
Example
1000
Input
Prefix
string
Default
Notes
List only objects prefixed with this string. For example, if you only want files in a directory called 'unprocessed', you can enter 'unprocessed/'. If this is left blank, all files in the selected bucket will be listed.
Example
path/to/files/

Output Example Payload#

{  "data": [    "Example Item 1",    "Example Item 2",    "Example Item 3"  ]}

Put Object#

Write an object to S3 | key: putObject

InputDefaultNotesExample
Input
AWS Access Key
connection
/ Required
Default
 
Notes
Access keys provide programmatic access to access resources in AWS. See https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html.
Example
 
Input
AWS Region
string
/ Required
Default
us-east-1
Notes
AWS provides services in multiple regions, like us-west-2 or eu-east-1. AWS region indicates the region in which your bucket(s) are stored.
Example
us-east-1
Input
Bucket Name
string
/ Required
Default
 
Notes
An Amazon S3 'bucket' is a container where files are stored. You can create a bucket from within the AWS console. Bucket names contain only letters, numbers, and dashes.
Example
my-s3-bucket-abc123
Input
File Contents
data
/ Required
Default
 
Notes
The contents to write to a file. This can be a string of text, it can be binary data (like an image or PDF) that was generated in a previous step.
Example
My File Contents
Input
Object Key
string
/ Required
Default
 
Notes
An object in S3 is a file that is saved in a 'bucket'. This represents the object's key (file path). Do not include a leading /.
Example
path/to/file.txt
Input
Object Tags
string
Key Value List
Default
 
Notes
Objects in an S3 bucket can be optionally tagged so you can filter for files more easily. For example, you may want to tag customers with a key of 'Customer Name' and value of 'Mars Missions Corp'
Example
 
note

File Contents can be a reference to a binary file from a previous step. For example, if you have an HTTP Get action that pulls down a .png image, you can reference its step name to write the .png to S3. Or, File Contents can be simple text, like 'Hello World'.

Output Example Payload#

{  "data": {    "ETag": "Example Tag",    "VersionId": "Example Version Id"  }}