Object Store

Object Store nodes provision storage locations for files within cloud services. For AWS, an Object Store maps to an S3 Bucket.

Object Stores also contain functionality beyond storage of files. Stores can be publicly readable and writable to allow end users to upload and download files. When object transactions occur Object Stores also emit messages that can be sent to Functions to trigger further processing. Lastly, Object Stores can operate as static content hosts for websites or other data fetched over HTTP. Stackery helps manage each of these features.

Message Formats

Accessing Objects

Objects can be accessed by sending messages from Function nodes to Object Store nodes. Input messages and responses are objects which have different properties depending on the action being performed.

Put

Upload an object to the Object Store.

Input
Property Type Default Description
action string (must be put) Action to be performed.
key string (required) Key for uploaded object. Example: foo/bar/file.txt
body string or Buffer or Stream (required) Contents for uploaded object. Example: Hello World!
publicPermissions string none Public permissions for uploaded object. Must be one of none, read, or write.
metadata Object {} Metadata to set for object, including headers like Content-Type for static website hosting responses. Example: {"Content-Type": "text/plain"}
Response
Property Type Description
etag string ETag value of uploaded object. Example: 5a8dd3ad0756a93ded72b823b19dd877

Get

Retrieve the contents, metadata, and ETag of an object

Input
Property Type Default Description
action string (must be get) Action to be performed.
key string (required) Object key. Example: foo/bar/file.txt
Response
Property Type Description
body Buffer Object contents.
etag string ETag value of uploaded object. Example: 5a8dd3ad0756a93ded72b823b19dd877
metadata Object Metadata of object, including headers like Content-Type for static website hosting responses. Example: {"content-type": "text/plain"}

Retrieve the metadata and ETag values without retrieving the contents of an object.

Input
Property Type Default Description
action string (must be head) Action to be performed.
key string (required) Object key. Example: foo/bar/file.txt
Response
Property Type Description
etag string ETag value of uploaded object. Example: 5a8dd3ad0756a93ded72b823b19dd877
metadata Object Metadata of object, including headers like Content-Type for static website hosting responses. Example: {"content-type": "text/plain"}

Copy

Copy an object from one key to another within the same Object Store. Metadata is also copied from the source to the destination object.

Input
Property Type Default Description
action string (must be copy) Action to be performed.
key string (required) Destination object key. Example: foo/bar/file2.txt
sourceKey string (required) Source object key. Example: foo/bar/file.txt
publicPermissions string none Public permissions for uploaded object. Must be one of none, read, or write.
Response
Property Type Description
etag string ETag value of destination object. Example: 5a8dd3ad0756a93ded72b823b19dd877

Delete

Delete an object from the Object Store.

Input
Property Type Default Description
action string (must be delete) Action to be performed.
key string (required) Object key. Example: foo/bar/file.txt
Response

An empty Object.

Transaction Events

Event messages are output when object transactions occur. The events are Objects with the following properties:

Property Type Description
eventType string Type of transaction. Possible values: put, copy, delete
store.id string Cloud service identifier of Object Store. Example: arn:aws:s3:::stackery-92837498734-objectstored8f7s82k-uywer878er7r
object.key string Object key. Example: foo/bar/file.txt
object.etag string or undefined Object ETag. Example: 5a8dd3ad0756a93ded72b823b19dd877
object.size number or undefined Size of object in bytes. Example: 19283
object.version string or undefined Version of object. Example: 8d7fs8
eventTime string or undefined Time of the transaction in ISO 8601 format. Example: 2008-09-22T14:01:54.9571247Z
sourceIPAddress string or undefined Source IP address. Example: 38.193.29.102

Settings

Name

A label used for the node in the canvas.

Public Permissions

Public permissions for accessing objects within the Object Store. The permissions can be set to None, Read, or Write. Write permissions also grant Read permissions.

Warning: Website Hosting will not work if public permissions is set to None.

Website Hosting

Whether to enable static content website hosting of objects within the Object Store. Enabling this feature will provision an HTTP Rest Api endpoint for accessing objects. After deployment, the endpoint can be found in the Properties pane of the node within the Status screen of the Deployment.

Directories accessed through the website endpoint will redirect to the index.html document within the directory. For example, http://endpoint.example.com/foo/bar/ will redirect to http://endpoint.example.com/foo/bar/index.html.

Referenceable Properties

The following properties may be referenced by Function and Docker Service nodes:

Property Value Example
id Cloud Service Identifier arn:aws:s3:::stackery-92837498734-objectstored8f7s82k-uywer878er7r

Try Stackery For Free

Gain control and visibility of your serverless operations from architecture design to application deployment and infrastructure monitoring.