Okay so last year my team got handed this absolute beast of a codebase. Like, the kind where you're scared to touch anything because you just KNOW something unrelated will break. Every deployment felt like defusing a bomb. We'd all just sit there hoping nothing explodes.
We tried the whole "let's just rewrite it" approach. Yeah... that wasn't going well lol.
Then someone on the team brought up the Strangler Fig pattern on AWS and honestly it changed everything for us.
The idea is simple instead of burning the whole thing down and rebuilding, you slowly wrap new stuff around the old stuff. Like how a strangler fig tree grows around another tree. The old tree is still standing, but the new one slowly takes over.
Here's what we actually did, step by step:
- Put API Gateway in front of the old system (this was the turning point)
- Pulled authentication out first into its own service
- Moved reporting and notifications into Lambda/ECS over time
- Used EventBridge so the old and new parts could talk to each other without fighting
- The old system kept running while we slowly moved traffic away from it
And here's the thing nobody tells you is the small wins kept the team sane.
Every sprint we'd ship something. Not huge, just one piece at a time. That feeling of actually making progress? After months of feeling stuck? It was everything.
We're not fully done yet. But today our deployments are faster, when something breaks it's contained, and when a new dev joins they're not immediately crying in the corner trying to understand the codebase 😅
One thing that genuinely gave us headaches though routing and keeping data consistent while both systems were running at the same time. That part was messy.