Skip to content

Migration playbook: Self-managed PostgreSQL (EC2) → Aurora PostgreSQL Serverless v2

Self-managed PostgreSQL to Aurora Serverless v2

Hand database operations — backups, failover and storage growth — to Aurora Serverless v2, with replication running until a short, rehearsed cutover.

Migration drivers

Why teams make this move

Driver 01

Backup and failover burden

Engineers maintaining Patroni failover, WAL archiving and disk resizing themselves.

Driver 02

Replica lag

Asynchronous replicas falling behind and serving stale reads to reports.

Driver 03

Fixed provisioning

Paying for peak-sized instances that can't scale down off-peak.

Execution sequence

How the migration runs

Each phase ends with a check you can verify — data parity, error rates, latency — and the rollback path is agreed before any traffic moves.

  1. 01Phase

    Aurora cluster in Terraform

    Provisioning an Aurora PostgreSQL Serverless v2 cluster across Availability Zones, with RDS Proxy.

  2. 02Phase

    Continuous replication

    Streaming changes from the current database to Aurora with logical replication or AWS DMS.

  3. 03Phase

    Benchmarking and validation

    Load testing, and comparing query plans and latency on Aurora.

  4. 04Phase

    Cutover

    Pausing writes, confirming sequences and replication are in sync, and switching connections to RDS Proxy.

Risk prevention

Pitfalls that derail this migration

Risk 01

Parameter group mismatches

Forgetting to copy custom postgresql.conf settings (shared_buffers, work_mem) to the Aurora parameter group.

Risk 02

DMS LOB truncation

Misconfigured DMS large object settings silently truncating large text and JSON columns.

Risk 03

No connection pooling

Connecting many serverless functions straight to Aurora without RDS Proxy.

Before and after

What we measure

We take a baseline before any change and report the same numbers after cutover, from your own tools. They are the evidence of whether the migration worked — not figures promised in advance.

Failover time
Measured in a forced failover test before go-live
Monthly cost
Current instances and storage vs Aurora capacity units
Replica lag
Seconds behind the writer under normal load

Questions

Frequently asked migration questions

It adjusts capacity in small increments of Aurora capacity units, within the minimum and maximum you set, without dropping connections. Set the maximum with your budget in mind.

Yes. Aurora stores six copies of your data across three Availability Zones and backs up continuously to Amazon S3.

Rehearse the cutover before the real one

Tell us about your data volume, traffic and timeline. An engineer will reply within one business day to set up a call about the migration plan and its rollback path.