Database migrations that stopped timing out
I moved TypeORM migrations off an API Gateway endpoint capped at 30 seconds onto a dedicated Lambda with a 15-minute window, run idempotently at three points of the release flow.
Outcome
- 30 s to 15 min migration time limit
- 3 automated run points
- 1 onboarding email, not 2
Stack
Ask me about this
The problem
Schema migrations ran through an API Gateway endpoint capped at 30 seconds. Any long change timed out halfway.
What I built
- A dedicated AWS Lambda for TypeORM migrations, with a 15-minute window, so long schema changes stopped timing out.
- It runs idempotently at 3 points: every staging deploy, the end of the nightly replication Step Function, and behind an approval gate in production.
Before API Gateway endpoint
After Dedicated AWS Lambda
Runs idempotently at 3 points
- 1 Every staging deploy
- 2 End of the nightly replication
- 3 Production, behind approval
Illustration with time sped up. The limits are the real ones: 30 seconds, and 15 minutes.
Product work
- Redesigned onboarding for law-firm admin users, replacing two conflicting verification and password emails with a single verify-and-set-password flow.
- Shipped platform features across React and Express, including cross-tab cache synchronization and bulk provider connection management.
Measured
Time limit for schema migrations
Rayna CorpMoved migrations off a capped API Gateway endpoint onto a dedicated Lambda, so long changes stopped timing out.
Onboarding emails for new admins
Rayna CorpReplaced separate verification and password emails for law-firm admins with a single verify-and-set-password flow.