Skip to content

Adapter - Amazon S3

This page describes version 2.0.1 of the adapter.

Overview

This adapter uses the Amazon Simple Storage Service API (Amazon S3) to store and retrieve data objects in an Amazon S3 bucket.

Limitations

This adapter does not support all of the functionality provided by the Amazon S3 API. Only basic integration is available at this time to put a data object into a bucket, get an object from a bucket, and delete an object from a bucket.

Text Content

Text data can be stored by inputting it directly into the Content Input Property. JSON object properties can also be specified by selecting the + next to Input Properties and adding a content.* property.

By default Data Type when retrieving objects using the Get Object command is text. If it is set to json the adapter will process the bucket object as a JSON file and flatten it into workflow properties.

It is not necessary to specify a Content Type when storing text data.

Binary Content

When binary data is stored using this adapter it must be base64 encoded prior to input. The adapter will decode it back into a binary object from base64 and the resulting binary object will be uploaded to the target bucket.

When a binary object is retrieved from a bucket the Data Type should be set to binary. The bucket object will be downloaded, encoded into base64 format, and the encoded data will be returned in the workflow command result.

Metadata

Metadata can be assigned while storing objects in a bucket. This is done by selecting the + next to the Input Properties of the Put Object command and adding a metadata.* property. Note that the S3 API will add the prefix x-amz-meta- to the key name chosen for each metadata property.

When data objects are retrieved from a bucket using the Get Object command their metadata properties are included in the result. All user-defined metadata key names are prefixed with x-amz-meta-.

Configuration

A valid AWS account is needed to use this adapter. Please refer to Amazon's Documentation for help configuring an S3 bucket and the access credentials necessary to access it.

All of the Amazon adapters, require a region, accessKey and secretKey. The regions list can be in Amazon's documentation. The accessKey and secretKey are accessed by logging in to your amazon account.

Accessing Secret Key

The secretKey can only be accessed once, directly after the accessKey and secretKey are generated.

The access key and secret key should be for a user that has permissions to access the S3 bucket(s) used by the adapter.



Properties

Name Display Is Required Comments Type Default Value Maximum Value Minimum Value Maximum Length Minimum Length
region AWS Region True The Amazon (AWS) region to run S3 commands. string us-east-1 64 1
accessKey Access Key True The Amazon account's Access Key. password 256 1
secretKey Secret Key True The Amazon account's Secret Key. password 256 1
bucket Bucket Name False The S3 bucket to use if not specified in the command. string 64 1



Commands

Get Object (get)

Get an object from a bucket.

Request Properties

Name Display Description Is Required Type
bucket Bucket The bucket to read from. If empty uses the default bucket set in adapter properties. False string
key Key The object key to get the data for. True string
datatype Data Type default=text: binary=base64 the result, json=parse the json into properties. False string

Response Properties

Name Description Type
content The content of the object. string
contenttype The content type set on the object. string
size The size of the object. string
lastmodified The timestamp the object was last modified. string
etag The ETag that was stored for this object. string

Put Object (put)

Add or overwrite an object to a bucket.

Request Properties

Name Display Description Is Required Type
bucket Bucket The bucket to write to. If empty uses the default bucket set in adapter properties. False string
key Key The object key to set the data for. True string
content Content The text to write. There overrides all other content properties. False string
contentbinary Content Binary Data The binary data to write. This is converted from base64 to binary data and written to the bucket. Make sure to also put in the correct content type for this request. False string
content.* Json Content All properties specified on the content.* keys will be part of the json content of this request. False string
contenttype Content Type The content type to set. False string
metadata.* Metadata Each 'metadata.*' adds that metadata to the object. Replace * with the metadata name. False string

Response Properties

Name Description Type
etag The ETag that was stored for this object. string

Delete Object (delete)

Delete an object from a bucket.

Request Properties

Name Display Description Is Required Type
bucket Bucket The bucket to delete from. If empty uses the default bucket set in adapter properties. False string
key Key The object key to delete. True string

Release History

Version Type Description Tracking # Date
2.0.1 Initial First release in the Adapter Type store. NAP-27390 2024-07-31

Categories