Migrating From Supabase to Amazon RDS: A Planning Guide
Moving from Supabase to Amazon RDS is easy for the Postgres data and hard for everything around it. Inventory what your app uses beyond the database (auth, storage, auto-generated APIs, realtime and row-level policies), replace each piece, then migrate data and cut over with a rehearsed plan.
Here's how to plan it so the only surprises are small ones.
Vendors Covered in this Article
Disclosure: We may earn a commission if you buy through some links on this page. It doesn't change what we recommend.
What are you actually leaving behind?
Supabase is Postgres plus services. RDS is Postgres only. List each service you use and decide its replacement:
- Auth: user records in the auth schema, sessions and providers need a new identity system, and password hashes need a plan for import.
- Auto-generated APIs: if clients call the database through the generated REST layer, you'll need your own API or another layer.
- Row-level security: policies that use Supabase's auth functions need a different way to know the current user, such as session settings your API sets per request.
- Storage: files in Supabase storage move to an object store, with URLs and access rules rewritten.
- Realtime and edge functions: each needs a replacement, such as your own websocket layer or serverless functions.
- Extensions: confirm every extension you use, including any vector search extension, is supported on RDS at your Postgres version.
If the answer is that you rely on most of these, ask honestly whether moving is worth it. The comparison in MongoDB Atlas vs AWS RDS vs Supabase and Supabase vs AWS RDS for software development companies helps frame that.
How to prepare the target database
Do the groundwork before copying data:
- Choose an RDS Postgres version at or above your current one and check extension support against your list.
- Create the instance in private subnets, with encryption, backups and Multi-AZ decided by your recovery targets.
- Recreate roles and grants. Dumps of one database don't include cluster-wide roles, and Supabase-specific roles won't exist.
- Decide connection handling. Supabase provides pooling; on RDS you may add a proxy or pooler for many short-lived connections.
- Exclude Supabase-managed schemas from the migration unless you have a reason to bring them, and move only your application schemas.
Size the instance from real metrics rather than guesses; the managed Postgres cost comparison shows how to price the options.
How do you copy the data?
For a database of modest size, dump and restore is simplest: run pg_dump for your application schemas, restore into RDS with pg_restore, then rebuild indexes and run analyze. Time a rehearsal with a real copy. The result tells you how long the maintenance window must be.
If the window is too long, look at logical replication, which streams changes from the old database to the new one until cutover. Whether it's available depends on your Supabase configuration and permissions, so check the current documentation and test it. After copying, verify: row counts on every table, checksums on critical ones, sequences set past the max ID, and constraints and triggers present. Run your application test suite against the new database.
What does cutover look like?
Write the runbook and rehearse it:
- Announce the window, and put the app in maintenance or read-only mode.
- Stop writes on the old database, and wait for replication or take the final dump.
- Restore or promote on RDS, verify counts, and reset sequences.
- Switch connection strings and secrets, and restart services.
- Run smoke tests: sign in, create a record, run a background job.
- Monitor errors and latency, and keep the old database read-only and intact as a fallback.
Decide the rollback trigger and who owns it before you begin. Rolling back after new writes on RDS is harder, so the fallback window is mostly for the first hours.
What should you do after the move?
Set up what Supabase used to provide. Turn on automated backups and test a restore into a scratch instance, add monitoring and alerts on CPU, storage, connections and replication, and document how migrations are applied. Review how you'll patch minor versions and plan for major upgrades. Watch cost for a month, including data transfer and storage growth. Your delivery process may also change; DORA's 2024 report describes lead time for changes from under one day to one to six months across its clusters1, so measure yours before and after to see whether the new setup slowed releases. Related move steps are in the Heroku to ECS checklist.
What Good Looks Like
Every Supabase service you rely on has a named replacement, and you've timed a full rehearsal of the data move and cutover.
Building The Capability (5-Stage Skill Ladder)
How to Get Started
Disclosure: We may earn a commission if you buy through some links on this page. It doesn't change what we recommend.
Frequently Asked Questions
Can I migrate from Supabase to RDS without downtime?
Sometimes, with logical replication that keeps both databases in sync until cutover, if your configuration allows it. Otherwise plan a short window using dump and restore. Rehearse either approach first.
What do I lose when leaving Supabase?
The services around Postgres: auth, generated APIs, storage, realtime and edge functions. RDS is a database only, so you replace each with your own code or other services.
Will my row-level security policies still work?
Policies are plain Postgres, but ones that call Supabase's auth helper functions need replacements. Many teams set the current user through session settings from their API layer and update the policies to read them.
How do I check the data copied correctly?
Compare row counts for every table, checksum critical tables, confirm sequences and constraints, and run your test suite against the new database. Keep the old database read-only until you're confident.
Sources
Where we quote a benchmark, we show its source. Other figures in this guide are estimates or general guidance, so check them against your own numbers.
- Lead time for changes by DORA performance cluster (upper bound, days). DORA Accelerate State of DevOps 2024 (Google Cloud), cluster table via Octopus Deploy analysis, 2024.
Related Guides
MongoDB Atlas vs AWS RDS vs Supabase: Managed Database Comparison
Compare MongoDB Atlas, AWS RDS, and Supabase for managed databases: document vs relational schemas, automated backups, developer velocity, and cloud cost.
Database Infrastructure for Agencies Building Client Software
How custom software and product engineering shops should choose between Supabase and AWS RDS across client projects, handoffs, and ownership transfer.
Comparing Managed Postgres Costs: Supabase and Amazon RDS
Compare managed Postgres cost between Supabase and Amazon RDS with a worksheet covering compute, storage, backups, high availability, bandwidth and staff time.
Moving From Heroku to AWS ECS: A Checklist by Stage
A staged checklist for moving an app from Heroku to AWS ECS: mapping dynos and add-ons, containers, database cutover, DNS and a rollback plan.
The Runbook for a Version Migration Nobody Notices
A step by step approach to migrating a service or database to a new major version without a maintenance window, and what to check before you start.
A Runbook for Zero-Downtime Schema Migrations on a Live Database
A step-by-step runbook for running schema migrations against a production database without an outage window, including the rollback checkpoints.