Authorized invocation
No interactive database shell.
PostgreSQL had no public route. Instead of creating a standing administrative host, I made migration access a constrained Lambda operation that could be confirmed, inspected, serialized, and audited.
AWS supports attaching Lambda functions to a VPC so they can access private resources through configured subnets and security groups. That let the database remain private while a purpose-built runner performed the occasional task.
No interactive database shell.
Mismatch is refused.
Task-scoped code and role.
No public route added.
Deployment cannot migrate. CI cannot reach the database. Dry-run shows current and proposed revisions before a separately confirmed invocation applies changes.
The runner stops on the first tenant failure, records progress, and resumes only through migration steps proven safe to repeat.
Do not report a partly migrated estate as complete.
Record which tenant and revision completed.
Reserved concurrency one caps simultaneous executions.
Package reuse must not spread database administration privileges.
The source’s near-zero cost is historical build context, not a quote. Logging, secrets, networking, invocations, and duration can incur charges.
A narrated view of the private network path, explicit environment gate, dry run, partial-failure behavior, and single-execution control.