Back to Browse

Fixing EC2 Data Loss | Serverless Postgres Migration | Flight Booking Engine | Day 86

108 views
Streamed live on Mar 22, 2026
34:26

Every push to GitHub was randomly deleting our entire database. Today, we find out why — and fix it permanently. In Day 86, we debug a critical infrastructure flaw where Terraform silently destroyed our EC2 database during routine deployments. To ensure our users never lose data again, we migrate our local Docker database to a fully managed Serverless Postgres provider. In this live build: The Terraform Flaw: Discovering how dynamic AWS AMI lookups caused catastrophic EC2 rebuilds, and implementing the lifecycle fix to protect our server. Decoupling the Database: Why running stateful databases like Postgres inside a stateless application server is dangerous for production. The Neon Migration: Transitioning to a free Serverless Postgres database on Neon.tech and injecting the connection string securely via GitHub Secrets. Docker Compose Profiles: Refactoring our compose.yaml using the local profile. We ensure we can still develop offline with a local database, while keeping our production EC2 server lean and fully remote. By the end of this stream, your backend architecture will be decoupled, infinitely safer, and ready to scale. 💬 Join the Community: 👉 https://discord.gg/bqUFaDaj 📘 Watch the full playlist: 👉 https://www.youtube.com/playlist?list=PLdtwawCR2QjmdfhM-7SzDOVGop373bbgW 📂 GitHub Repo (Public Mirror): 👉 https://github.com/KNehe/aero_bound_ventures-public.git 🔥 Subscribe to master modern DevOps and Backend Engineering. #FastAPI #DevOps #Terraform #Postgres #NeonDB #BackendEngineering #SoftwareArchitecture #Python"

Download

0 formats

No download links available.

Fixing EC2 Data Loss | Serverless Postgres Migration | Flight Booking Engine | Day 86 | NatokHD