This guide will show you how to analyze DynamoDB data with Tinybird.
You'll use Tinybird's DynamoDB Connector to capture historical and change data from DynamoDB tables and import it into Tinybird.
- Clone this repo
The DynamoDB Connector docs cover the integration in more detail.
- Create a DynamoDB table called
tinybird_flightswith Partition keytransaction_idof typeString - Enable DDB Streams & PITR on the table
- Create a new S3 bucket called
tinybird-flights - Create a new IAM Policy called
tinybird_flightsusing the IAM Policy template - Create a new IAM Role called
tinybird_flightsand apply the IAM Role template
- Create a Tinybird account & Workspace
- Copy your admin token
- Go to the
tinybirddir of this repo - Create a python venv with
python3 -m venv .venv - Activate the venv with
source .venv/bin/activate - Install the Tinybird CLI with
pip install tinybird-cli - Authenticate with the CLI with
tb auth - Create a DynamoDB connection
tb connection create dynamodb - Run
tb pushto push the Tinybird resources to your Workspace
The demo uses Vercel and Next.js.
Vercel Serverless Functions are used for the backend APIs that interact with DynamoDB. To ensure that the DynamoDB calls work properly, you should use the Vercel CLI and vercel dev to run the app locally.
Tinybird APIs are called directly from the browser.
- Install the Vercel CLI
- Go to the
app/dynamodb-tinybird-flightsdir of this repo - Install dependencies with
pnpm i - Configure your environment variables in a
.envfile. You can use the.env.examplefile as a template. - Run locally with
vercel dev - Go to the UI on
http://localhost:3000 - On the UI, use the data control buttons to send some data to the DynamoDB table