S3 Cache icon

S3 Cache

Read and write cached objects backed by Amazon S3

Cache Store

AI-generated

Summary

Store a cache entry in an Amazon S3 bucket under a unique Cache ID with a specified time-to-live (TTL).

Inputs

  • Cache ID (required) — Unique identifier used as the cache key to store the cached data under.
  • TTL (Seconds) (required) — Duration in seconds that the cached data should remain valid.
  • Payload Source (required) — Select whether to store JSON data or binary file content.
  • JSON Data — JSON payload to cache; defaults to the entire incoming JSON item. Used only if Payload Source is 'JSON'.
  • Binary Property — Name of the binary property on the incoming item to store. Used only if Payload Source is 'Binary'.

Output shape

Returns the input item(s) that were successfully cached through the main output.

Data is stored as an object in the specified S3 bucket and folder (if any) with the Cache ID as the object key. When storing JSON, the JSON is serialized UTF-8; when storing binary, the specified binary property is stored with its original MIME type. Cache TTL is saved as metadata for expiration handling but is not enforced automatically by S3.

Examples

Example 1: Storing JSON payload

Cache ID set to a unique string used as the S3 object key, TTL set to 300 seconds, Payload Source set to 'JSON', and JSON Data defaulting to incoming item data.

Example 2: Storing binary data

Cache ID set appropriately, TTL set, Payload Source set to 'Binary', and Binary Property set to the binary data property name containing the file data to cache.

Discussion