Amazon S3 Component

Manage files within an Amazon (AWS) S3 bucket
Component key: aws-s3#
DescriptionAmazon 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 SecretAn 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.
Input | Notes | Example |
---|---|---|
Input Access Key ID string / Required accessKeyId | Notes An AWS IAM Access Key ID | Example AKIAIOSFODNN7EXAMPLE |
Input Secret Access Key password / Required secretAccessKey | Notes An AWS IAM Secret Access Key | Example wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY |
#
Data Sources#
Select AWS RegionSelect an AWS region | key: selectRegion | type: picklist
#
Select BucketChoose a bucket from a list | key: selectBucket | type: picklist
Input | Default | Notes | Example |
---|---|---|---|
Input AWS Access Key connection / Required accessKey | 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 awsRegion | 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 |
#
Actions#
Copy ObjectCopy an object in S3 from one location to another | key: copyObject
Input | Default | Notes | Example |
---|---|---|---|
Input AWS Access Key connection / Required accessKey | 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 ACL Permissions string acl | Default | Notes A set of canned ACL permissions to apply to the object. See https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl | Example |
Input AWS Region string / Required awsRegion | 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 destinationBucket | 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 destinationKey | 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 sourceBucket | 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 sourceKey | 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 ObjectDelete an Object within an S3 Bucket | key: deleteObject
Input | Default | Notes | Example |
---|---|---|---|
Input AWS Access Key connection / Required accessKey | 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 awsRegion | 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 bucket | 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 objectKey | 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 ObjectGet the contents of an object | key: getObject
Input | Default | Notes | Example |
---|---|---|---|
Input AWS Access Key connection / Required accessKey | 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 awsRegion | 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 bucket | 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 objectKey | 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": {}, "contentType": "application/octet"}
#
List ObjectsList Objects in a Bucket | key: listObjects
Input | Default | Notes | Example |
---|---|---|---|
Input AWS Access Key connection / Required accessKey | 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 awsRegion | 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 bucket | 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 continuationToken | Default | Notes Specify the pagination token that's returned by a previous request to retrieve the next page of results | Example lslTXFcbLQKkb0vP9Kgh5hy0Y0OnC7Z9ZPHPwPmMnxSk3eiDRMkct7D8E |
Input Include Metadata boolean / Required includeMetadata | Default false | Notes By default, this action returns a list of object keys. When this is set to true, additional metadata about each object is returned, along with pagination information. | Example |
Input Max Keys string maxKeys | 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 prefix | 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 ObjectWrite an object to S3 | key: putObject
Input | Default | Notes | Example |
---|---|---|---|
Input AWS Access Key connection / Required accessKey | 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 ACL Permissions string acl | Default | Notes A set of canned ACL permissions to apply to the object. See https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl | Example |
Input AWS Region string / Required awsRegion | 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 bucket | 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 fileContents | 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 objectKey | 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 tagging | 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" }}