Skip to main content

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

  1. Create .env file in aws/ai/ directory:
  1. Create scenarios table in Supabase:

Deployment Commands

Dev Environment (Safe - Won’t Affect Production)

This creates AgentStack-dev with all resources prefixed with dev-.

Production Environment (Uses Existing Stack)

This uses your existing AgentStack without changes.

Post-Deployment Steps

  1. Get NAT Gateway IP from CDK output
  2. Add IP to Supabase network restrictions:
    • Go to Supabase Dashboard → Settings → Database
    • Add the NAT Gateway IP to allowed connections

Verification

  1. Check Lambda functions are deployed
  2. Verify DynamoDB streams are enabled
  3. Test by creating a consultation - data should appear in Supabase scenarios table
  4. Monitor CloudWatch logs for any errors

Architecture

The system provides real-time data synchronization with error handling, retry logic, and complete environment isolation.