AWS S3

Interact with AWS S3 objects and buckets

Component key: aws-s3

Description#

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

Authorization Methods#

AWS S3 requires one of the following authorization methods:

Auth TypeKeyDescriptionFields
API Key / Secretapi_key_secretAPI Key / Secret Combination

API Key |  api_key

API Secret |  api_secret

An AWS IAM access key pair is required to interact with AWS S3. The AWS access_key_id serves as the API Key, and the secret_access_key serves as the API Secret.

Actions#

Copy Object#

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

InputKeyNotesExample

AWS Region

string
/ Required
awsRegionAWS 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.us-east-1

Destination Bucket Name

string
/ Required
destinationBucketAn AWS 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.my-destination-bucket

Destination Key

string
/ Required
destinationKeyAn 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 /.path/to/destination/file.txt

Source Bucket Name

string
/ Required
sourceBucketAn AWS 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.my-source-bucket

Source Key

string
/ Required
sourceKeyAn 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 /.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

InputKeyNotesExample

AWS Region

string
/ Required
awsRegionAWS 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.us-east-1

Bucket Name

string
/ Required
bucketAn AWS 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.my-s3-bucket-abc123

Object Key

string
/ Required
objectKeyAn 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 /.path/to/file.txt

Get Object#

Get the contents of an object | key: getObject

InputKeyNotesExample

AWS Region

string
/ Required
awsRegionAWS 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.us-east-1

Bucket Name

string
/ Required
bucketAn AWS 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.my-s3-bucket-abc123

Object Key

string
/ Required
objectKeyAn 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 /.path/to/file.txt

Output Example Payload#

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

List Objects#

List Objects in a Bucket | key: listObjects

InputKeyNotesExample

AWS Region

string
/ Required
awsRegionAWS 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.us-east-1

Bucket Name

string
/ Required
bucketAn AWS 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.my-s3-bucket-abc123

Prefix

string
prefixList 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.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

InputKeyNotesExample

AWS Region

string
/ Required
awsRegionAWS 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.us-east-1

Bucket Name

string
/ Required
bucketAn AWS 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.my-s3-bucket-abc123

File Contents

data
/ Required
fileContentsThe 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.My File Contents

Object Key

string
/ Required
objectKeyAn 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 /.path/to/file.txt

Object Tags

string
taggingObjects 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'
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"
}
}