CRE Workflows HubCRE Workflows Hub
  • Workflows
  • Chainlink repo
  • Sign in
CRE Workflows Hub
  • Workflows
  • Docs
  • Contribute workflow
  • Chainlink CRE Templates

A registry for Chainlink Runtime Environment workflows. List and share your CRE workflows without waiting for upstream approval.

Back

Created by Chainlink Labs

Key-Value Store (AWS S3)

A minimal example that reads a value from an AWS S3 object, increments it, and writes it back using SigV4-signed HTTP requests.

View on GitHub
Go

A minimal example that, on a cron schedule, reads a value from an AWS S3 object, increments it, and writes it back using CRE (Chainlink Runtime Environment) with SigV4-signed HTTP requests.

The workflow:

  • Retrieves AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY from CRE Secrets
  • Signs the request with AWS SigV4 (timestamp from consensus runtime)
  • Reads the S3 object (initializes to 0 if missing)
  • Aggregates the current value across nodes (median), increments once, writes the agreed next value back

Setup: Add AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY as CRE secrets (or env for local testing). Configure my-workflow/config.json: schedule (6-field cron), aws_region, s3_bucket, s3_key (e.g. cre-counter.txt).

Run: cre workflow simulate my-workflow

Example output: OldValue, NewValue in JSON.

Install the CRE CLI to use this template

You can use the command below or download the latest CLI release on GitHub.

curl -sSL https://cre.chain.link/install.sh | bash
Author
Chainlink Labs
LicenseMIT

Disclaimer

This template represents an educational example to use a Chainlink system, product, or service and is provided to demonstrate how to interact with Chainlink's systems, products, and services to integrate them into your own. This template is provided "AS IS" and "AS AVAILABLE" without warranties of any kind, it has not been audited, and it may be missing key checks or error handling to make the usage of the system, product or service more clear. Do not use this example in a production environment without completing your own audits and application of best practices. Neither Chainlink Labs, the Chainlink Foundation, nor Chainlink node operators are responsible for unintended outputs that are generated due to errors in code.