Migration Roadmap

checkout-core → Aurora DSQL

Estimated total: 6–8 weeks across three phases

Back to analysis

Phase 1

Schema Refactor

2–3 weeksModerate

Normalize trigger logic into application services and document foreign-key constraints for the target engine.

  • Extract trigger logic into service layer
  • Map FK constraints to Aurora DSQL equivalents
  • Define access patterns and partition strategy
  • Establish migration test harness

Phase 2

Data Migration

3–4 weeksHigh

Stream historical data with change-data-capture, validate row counts, and reconcile referential integrity.

  • Provision target cluster and IAM roles
  • Backfill with CDC dual-write window
  • Checksum reconciliation per table
  • Cut read traffic to shadow cluster

Phase 3

Cutover

1 weekModerate

Freeze writes, perform final delta sync, flip the connection string, and monitor latency and error budgets.

  • Final delta synchronization
  • Flip application connection string
  • Monitor p99 latency + error rate
  • Decommission legacy instance

Target architecture

Zero-downtime cutover topology with change data capture.

Source

PostgreSQL primary

Live production traffic

CDC dual-write

Change data capture

Backfill + delta sync

Target

Aurora DSQL cluster

Shadow then primary

Migration preview

Example transformation for the orders table.

Source · PostgreSQL
CREATE TABLE orders (
  id          BIGSERIAL PRIMARY KEY,
  customer_id BIGINT REFERENCES customers(id),
  status      VARCHAR(32),
  total_cents INTEGER
);

CREATE TRIGGER trg_order_total
AFTER INSERT ON order_items ...
Target · Aurora DSQL
-- Aurora DSQL (PostgreSQL compatible)
CREATE TABLE orders (
  id          BIGINT GENERATED ALWAYS AS IDENTITY,
  customer_id BIGINT NOT NULL,
  status      TEXT,
  total_cents INTEGER,
  PRIMARY KEY (id)
);
-- trigger logic moved to service layer