
I Broke My AWS Pipeline on Purpose and Codified Everything in Terraform
Testing automatic rollback by deploying broken code, then codifying 30 AWS resources into Terraform so the entire CI/CD pipeline can be created with one command. This is Part 2. Read Part 1 here: I Built a Full AWS CI/CD Pipeline with Blue/Green Deployments Last week I built an AWS-native CI/CD pipeline with blue/green deployments. Someone on LinkedIn asked a great question: "Did you test that rollback works without manual intervention?" I hadn't. So I did. Then I codified the entire infrastructure in Terraform. Proving Rollback Actually Works It's one thing to configure auto-rollback. It's another to watch it fire. I needed to deploy a broken version and confirm the system recovers on its own. Two Layers of Safety The pipeline has two layers of protection, and I accidentally discovered the first one. Layer 1: Tests catch bad code in CodeBuild. My first attempt was changing the /health endpoint to return a 500. But bun test tests that endpoint, so the build failed before the code ever
Continue reading on Dev.to
Opens in a new tab




