AWS DMS: Supabase to Aurora
Step-by-step guide for migrating your Supabase database to AWS Aurora using Database Migration Service
Overview
This guide walks you through migrating your Supabase Helium database to AWS Aurora (helium-mumbai-dev) in us-east-1 using AWS Database Migration Service (DMS). Every step is written so you can follow it one-by-one in the AWS and Supabase consoles without getting lost.
Follow these steps in sequence for a successful migration:
Gather Information
Get Supabase and Aurora connection details
Check Database Size
Choose appropriate DMS instance class
Pre-Flight Worksheet
Fill in all required values
Create Replication Instance
Set up DMS in us-east-1
Source Endpoint
Configure Supabase connection
Target Endpoint
Configure Aurora connection
Migration Task
Set up table mappings and transformations
Run & Monitor
Execute migration and track progress
Verify Data
Check row counts and data integrity
Part 0: Before You Start – Gather Information
You need three things before touching AWS DMS:
- Supabase connection details (host, port, database, user, password)
- Supabase database size (so you can pick the right DMS instance class)
- Aurora connection details (cluster endpoint, port, database, user, password)
0.1 Get Supabase Connection Details
- Open your browser and go to Supabase Dashboard
- Log in and select the Helium project
- In the left sidebar, click Project Settings (gear icon at the bottom)
- In the left menu under Project Settings, click Database
- On the Database page you will see:
- Host:
db.gdkwidkzbdwjtzgjezch.supabase.co - Port:
5432 - Database name:
postgres - User:
postgres - Password: Click Reveal and copy it
- Host:
Write these values in the Pre-Flight Worksheet (Part 2)
0.2 Get Aurora Connection Details (Writer Endpoint)
- Open AWS Console and switch region to US East (N. Virginia) = us-east-1
- In the search bar type RDS and open it
- In the left sidebar click Databases
- Click the helium-mumbai-dev cluster
- Find the Connectivity & security tab
- Copy the Writer (cluster) endpoint
helium-mumbai-dev.cluster-xxxxxxxxxxxx.us-east-1.rds.amazonaws.com - Note:
- Port: 5432
- Database name: postgres (or your DB name)
- User / Password: Master user credentials
Do not use the Reader endpoint for DMS target
Part 1: Know Your Database Size (Choose DMS Instance)
DMS runs on a replication instance. Its size (instance class and storage) should match your database size so the full load finishes in reasonable time and doesn't run out of resources.
1.1 Check Supabase Database Size
Option A – Supabase Dashboard
- In Supabase: Project Settings → Database (or Usage)
- Look for Database size or Storage
Option B – Run SQL (Recommended)
- In Supabase, open SQL Editor
- Click New query
- Paste this and click Run:
SELECT pg_size_pretty(pg_database_size(current_database())) AS db_size;
In the result you will see one row, e.g. 3955 MB or 4 GB. That is your total database size.
The database size is about 3955 MB (~4 GB)
1.2 Optional: See Size per Schema/Table
To see which tables use the most space:
SELECT schemaname, relname AS table_name, n_live_tup AS row_count,
pg_size_pretty(pg_total_relation_size(schemaname||'.'||relname)) AS total_size
FROM pg_stat_user_tables
WHERE schemaname IN ('public','basejump','auth')
ORDER BY pg_total_relation_size(schemaname||'.'||relname) DESC;
Example for Helium:
- public.messages – ~3044 MB, ~743k rows
- public.usage_logs – ~287 MB
- public.user_dagad_embeddings – ~258 MB
- auth.audit_log_entries – ~39 MB
1.3 Choose DMS Replication Instance Class and Storage
| Database Size | Recommended Instance | Storage (GiB) | Notes |
|---|---|---|---|
| Under 10 GB | dms.c5.large |
50–100 | Good for Helium (~4 GB) |
| 10 GB – 50 GB | dms.c5.xlarge |
100 | |
| 50 GB – 200 GB | dms.c5.2xlarge |
100–200 | |
| 200 GB – 1 TB | dms.c5.4xlarge or larger |
200+ |
Use dms.c5.large and 50 GiB (or 100 GiB to be safe)
Part 2: Pre-Flight Worksheet (Fill This First)
Copy this block and fill the blanks before you start in the AWS Console. That way you can paste values instead of switching between tabs.
=== SOURCE (Supabase Helium) ===
Host: db.gdkwidkzbdwjtzgjezch.supabase.co
Port: 5432
Database: postgres
User: postgres
Password: ________________ (from Supabase Project Settings → Database)
=== TARGET (Aurora helium-mumbai-dev) ===
Server name: ________________ (from RDS → Databases → helium-mumbai-dev → Endpoint)
Port: 5432
Database: postgres (or your DB name)
User: ________________
Password: ________________
=== DMS REPLICATION INSTANCE (from Part 1.3) ===
Instance class: dms.c5.large
Storage (GiB): 50
VPC: ________________ (same VPC as Aurora – from RDS cluster details)
Part 3: Step-by-Step – Create Replication Instance
- Open AWS Console, region us-east-1 (N. Virginia)
- Search for DMS or Database Migration Service and open it
- In the left sidebar, click Replication instances
- Click the orange Create replication instance button
- Fill the form exactly as below
Basic Configuration
| Field | What to Enter |
|---|---|
| Name | helium-supabase-to-aurora (or any name you like) |
| Description | Optional, e.g. Migration from Supabase Helium to Aurora |
| Instance class | Choose dms.c5.large |
| Engine version | Leave default (e.g. 3.4.x) |
| Multi-AZ | Dev or test workload (Single-AZ) to save cost |
| Allocated storage (GiB) | 50 (or 100) |
Network Configuration
| Field | What to Do |
|---|---|
| VPC | Select the same VPC as your Aurora cluster. Find it in RDS → Databases → helium-mumbai-dev → Connectivity & security |
| Replication subnet group | Leave default (or the one that includes private subnets for Aurora) |
| Publicly accessible | Set to Yes so the instance can reach Supabase on the internet |
| VPC security group(s) | Select a security group that allows outbound to Supabase (port 5432) and to Aurora (port 5432 in VPC) |
- Open the Advanced security and network configuration section if needed
- Click Create replication instance
- Wait until Status is Available (a few minutes)
- Click your instance name in the Replication instances page
- Look for Public IP or IP address and copy it
- Go to Supabase Dashboard → Helium project → Project Settings → Database
- Find Restrict connections to specific IP addresses
- Add the DMS instance public IP (e.g.
52.1.2.3/32). Save.
Without this step, the source endpoint test will fail!
Part 4: Step-by-Step – Create Source Endpoint (Supabase)
- In DMS, in the left sidebar click Endpoints
- Click Create endpoint
- Endpoint type: select Source endpoint
- Endpoint configuration – choose Provide access information manually
- Fill in using your Pre-Flight worksheet:
| Field | Value |
|---|---|
| Endpoint identifier | supabase-helium-source |
| Source engine | PostgreSQL |
| Server name | db.gdkwidkzbdwjtzgjezch.supabase.co |
| Port | 5432 |
| User name | postgres |
| Password | Your Supabase database password |
| Database name | postgres |
| SSL mode | require (Supabase uses SSL) |
- Scroll to Test endpoint connection (optional):
- VPC: Same VPC as your replication instance
- Replication instance: Select
helium-supabase-to-aurora - Click Run test
- If the test fails:
- Confirm Supabase Network restrictions allow the DMS instance's public IP
- Confirm the password and that the user can connect
- Security group: outbound rule allowing port 5432 to 0.0.0.0/0
- When the test shows Successful, click Create endpoint
Part 5: Step-by-Step – Create Target Endpoint (Aurora)
- Endpoints → Create endpoint again
- Endpoint type: Target endpoint
- Endpoint configuration: If you see Select RDS DB instance and your Aurora cluster is listed, you can select helium-mumbai-dev. Otherwise choose Provide access information manually
- Fill in:
| Field | Value |
|---|---|
| Endpoint identifier | aurora-helium-target |
| Target engine | Amazon Aurora PostgreSQL or PostgreSQL |
| Server name | Your Aurora writer endpoint from Pre-Flight worksheet |
| Port | 5432 |
| User name | Your Aurora DB user |
| Password | Aurora user password |
| Database name | postgres (or your DB name) |
| SSL mode | prefer or require |
- Test endpoint connection:
- VPC: Same as replication instance and Aurora
- Replication instance: Your DMS replication instance
- Click Run test
- If it fails: check that the replication instance is in the same VPC as Aurora and the security group allows outbound to Aurora on port 5432
- When Successful, click Create endpoint
Part 6: Step-by-Step – Create the Migration Task
- In the left sidebar click Database migration tasks
- Click Create task
- Task configuration:
| Field | Value |
|---|---|
| Task identifier | helium-supabase-aurora-full |
| Replication instance | Your replication instance |
| Source database endpoint | supabase-helium-source |
| Target database endpoint | aurora-helium-target |
| Migration type | Migrate existing data (full load) |
Task Settings
- Target table preparation mode: Do nothing (Aurora tables already exist)
- Stop task after full-load completes: Stop
- Include LOB columns: Limited LOB mode with max LOB size (e.g. 64 KB or 1 MB)
Table Mappings (Critical)
5a. Add Selection Rules
Click Add new selection rule:
- Schema: Enter a schema → Schema name:
public→ Table name:% - Rule action: Include
Click Add new selection rule again:
- Schema: Enter a schema → Schema name:
basejump→ Table name:% - Rule action: Include
5b. Add Transformation Rule (Rename basejump → helium_auth)
In the same Table mappings section, find Transformation rules:
- Object locator: Schema name =
basejump - Rule target: Schema
- Rule action: Rename
- Value:
helium_auth
5c. JSON Edit Option (Alternative)
If the console has a "JSON" edit option for table mapping, you can paste this:
{
"rules": [
{
"rule-type": "selection",
"rule-id": "1",
"rule-name": "include-public",
"object-locator": { "schema-name": "public", "table-name": "%" },
"rule-action": "include"
},
{
"rule-type": "selection",
"rule-id": "2",
"rule-name": "include-basejump",
"object-locator": { "schema-name": "basejump", "table-name": "%" },
"rule-action": "include"
},
{
"rule-type": "transformation",
"rule-id": "3",
"rule-name": "rename-basejump-to-helium-auth",
"object-locator": { "schema-name": "basejump" },
"rule-target": "schema",
"rule-action": "rename",
"value": "helium_auth"
}
]
}
- Migration task startup configuration:
- Choose Start task on create to run immediately, or Manually later
- Click Create task
Part 7: Run the Migration and Monitor
- Open Database migration tasks and click your task
helium-supabase-aurora-full - If status is Stopped, click Resume or Start and confirm
- Table statistics tab:
- You'll see each table with state (e.g. Full load completed or Loading)
- Wait until all tables show Full load completed
- The largest table (e.g.
public.messages) will take the longest
- Monitoring tab / CloudWatch:
- Use the task's CloudWatch log stream to see any errors
- If a table fails:
- Note the table name and the error in the logs
- Fix (e.g. target table missing, column name different, constraint) and use Reload table
Do not delete the task or replication instance until you've verified data (Part 8)
Part 8: Post-Migration Verification
1. Row Counts on Supabase (Source)
In Supabase SQL Editor run:
SELECT schemaname, relname, n_live_tup AS rows
FROM pg_stat_user_tables
WHERE schemaname IN ('public','basejump')
ORDER BY schemaname, relname;
2. Row Counts on Aurora (Target)
Connect to Aurora and run:
SELECT schemaname, relname, n_live_tup AS rows
FROM pg_stat_user_tables
WHERE schemaname IN ('public','helium_auth')
ORDER BY schemaname, relname;
3. Compare Results
For each table:
- public on source should match public on target
- basejump on source should match helium_auth on target
- Row counts should match
If pg_stat_user_tables is not updated yet, run ANALYZE; on Aurora and run the query again
4. Spot Check
Pick a few important tables (e.g. public.agents, helium_auth.accounts) and compare a few rows by primary key between Supabase and Aurora.
Troubleshooting
| Problem | What to Do |
|---|---|
| Source endpoint test fails |
|
| Target endpoint test fails |
|
| Task fails on a table | Open CloudWatch log for the task; find the table and error (e.g. duplicate key, missing column). Fix target schema or add transformation, then Reload that table or restart task |
| basejump data not in helium_auth | Ensure transformation rule is set: schema basejump → rename to helium_auth. Restart task after adding the rule |
| Very slow full load | Increase replication instance class (e.g. to dms.c5.xlarge) or allocated storage; check CloudWatch for CPU/memory |