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

AWS CRE Price Feeds & Proof of Reserves

Workflows using Chainlink CRE to fetch data from AWS serverless APIs and write results to Ethereum smart contracts.

View on GitHub
Go

Authored by: Simon Goldberg (AWS)

Overview

This project demonstrates workflows using the Chainlink Runtime Environment to fetch data from AWS serverless APIs and write results to Ethereum smart contracts.

The system combines AWS reliability with decentralized trust guarantees to support digital asset price feeds and proof-of-reserves monitoring.

Architecture

Architecture

Use Cases

  • Price feeds for DeFi protocols: Low-latency, tamper-resistant pricing data for lending, derivatives, and AMMs with decentralized verification.
  • Proof-of-reserves monitoring: Continuous verification that stablecoins and wrapped assets are fully backed by underlying reserves.
  • Custom data feeds: Configurable, multi-source data feeds for tokenized assets.

Components

  • AWS Serverless Backend — REST API with Lambda and DynamoDB for oracle data storage (Setup Guide)
  • CRE Workflows — Go-based workflow for data fetching and contract updates (Setup Guide)
  • Smart Contracts — PriceFeed and CollateralizationMonitor contracts on Ethereum Sepolia (Contract Guide)

Prerequisites

  • AWS CLI — Configured with credentials (Installation)
  • AWS SAM CLI — For serverless deployment (Installation)
  • CRE CLI — v1.0.3+ (Installation)
    • After installation, authenticate with cre login
    • Verify authentication with cre whoami
  • Node.js — 20+ for AWS Lambda functions
  • Go — 1.25.3+ for CRE workflows
  • Sepolia ETH — For contract deployment and transactions (Get testnet ETH at a public faucet)

Note for Windows users: This sample uses Bash scripts and Unix tools. Please run deployments using WSL2.

Quick Start

Automated Deployment (Recommended)

Clone the repository and deploy everything with a single script:

git clone https://github.com/aws-samples/sample-cre-pricefeeds-por.git
cd sample-cre-pricefeeds-por
./deploy-all.sh

This automates:

  • AWS infrastructure deployment (Lambda, API Gateway, DynamoDB)
  • Smart contract deployment to Sepolia
  • CRE workflow configuration and testing

See the sections below for details and deeper dives.

Manual Deployment

  1. Deploy AWS Backend — Deploy the serverless REST API with Lambda and DynamoDB. See AWS Backend README for complete setup instructions.

  2. Setup and Run CRE Workflow — Configure and run the CRE workflow to fetch data from AWS and update smart contracts on Ethereum Sepolia. See CRE Workflow README for complete setup instructions, including smart contract deployment and configuration.

Note: CRE is also available in TypeScript. For TypeScript implementation details, refer to the CRE documentation.

Documentation

  • AWS Backend Setup
  • CRE Workflow Setup
  • Smart Contract Deployment

Technology Stack

  • Chainlink CRE — v1.0.3 (Workflow orchestration)
  • AWS SAM — Infrastructure as Code
  • Amazon API Gateway — Managed API service for HTTP/REST endpoints, Lambda integration and authorization
  • AWS Lambda — Serverless compute
  • AWS DynamoDB — NoSQL database
  • Solidity — Smart contracts
  • Foundry — Contract development
  • Go — Workflow implementation

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

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.