DynamoDB to Supabase Streaming - Deployment Guide
Overview
This system streams data from AWS DynamoDB ConsultationsTable to Supabase scenarios table in real-time using DynamoDB Streams and Lambda functions.Prerequisites
- AWS CLI configured with appropriate permissions
- CDK installed (
npm install -g aws-cdk) - Supabase project with scenarios table created
- Environment variables configured
Environment Setup
- Create .env file in aws/ai/ directory:
- Create scenarios table in Supabase:
Deployment Commands
Dev Environment (Safe - Won’t Affect Production)
AgentStack-dev with all resources prefixed with dev-.
Production Environment (Uses Existing Stack)
AgentStack without changes.
Post-Deployment Steps
- Get NAT Gateway IP from CDK output
- Add IP to Supabase network restrictions:
- Go to Supabase Dashboard → Settings → Database
- Add the NAT Gateway IP to allowed connections
Verification
- Check Lambda functions are deployed
- Verify DynamoDB streams are enabled
- Test by creating a consultation - data should appear in Supabase scenarios table
- Monitor CloudWatch logs for any errors