Safe migration strategy

  1. Create isolated test environment (~/strapi-test)
  2. Point it at production RDS (currently unused)
  3. Import and verify data in RDS
  4. Switch production to RDS
  5. Keep SQLite as rollback for a few days

Gotcha 1: config file type

Strapi projects can have database.js or database.ts. Editing the wrong one has no effect — SQLite data.db keeps getting created despite your PostgreSQL config.

ls config/database.*   # check which exists before editing

Gotcha 2: PostgreSQL SSL on RDS

RDS requires SSL. Two errors you’ll hit:

ErrorCauseFix
no pg_hba.conf entry... no encryptionSSL not enabledAdd ssl: { rejectUnauthorized: false } to connection config
self-signed certificate in certificate chainRDS uses self-signed certsSame fix — rejectUnauthorized: false