It was a Friday afternoon: new client, tight deadline, and the very reasonable-sounding idea to just vibe-code the whole thing. Describe the pipeline I needed, let the AI generate everything, ship it. What that weekend actually taught me is that vibe coding an AI pipeline can bury a cost disaster the model completely missed. And the bill lands on you, not the model. By Monday morning I was looking at $14,000 of AWS charges for two days of "working" infrastructure.
The setup: a whole platform in an afternoon
Here's what I asked for in plain English, and got back in minutes:
- Terraform modules for the infrastructure
- Kubernetes manifests for the workloads
- GitHub Actions workflows for CI/CD
- Monitoring dashboards on top
Tests passed. Linting was green. The code was genuinely clean, better formatted than a lot of the human-written Terraform I've inherited over ten years. The structure looked solid, so I deployed. Friday evening I closed the laptop feeling like I'd done three days of work in three hours.
Monday morning: the bill
I opened the AWS console with my coffee. $14,000. One weekend. AI-generated infrastructure, nobody's eyes on it but mine, and honestly I hadn't really looked either.
Nothing had crashed. Nothing was broken. That's the unsettling part: everything worked exactly as written. It was just quietly, expensively wrong.
What the AI missed
When I finally read the code line by line, the way I should have on Friday, the problems were obvious to anyone who's paid an AWS bill before:
- On-demand instances instead of spot. Same compute, roughly 3x the price. The workload ran about four hours a day, and spot instances alone would have cut the bill by around 80%.
- An auto-scaler with no maximum. No ceiling at all. Under load it happily spun up node after node into the void, and nothing told it to stop.
- Zero cost alerts. No budget, no anomaly detection, no "hey, you're at $2,000 on a Saturday" email. The first alert I got was the invoice itself.
Every one of these is something an experienced engineer catches in thirty seconds of review. The AI caught none of them, because the code wasn't wrong. It ran. The AI optimized for correctness (does this work?), and correctness has nothing to say about whether the answer costs $1 or $14,000.
AI vs. senior judgment
The comparison is what stuck with me. The AI version works perfectly and costs 10x. A senior engineer's version works perfectly and costs 1x. The gap isn't code quality. It's judgment.
Judgment is knowing that this particular workload only runs four hours a day. It's knowing the client's budget, their traffic patterns, their on-call rotation, their compliance constraints, and what's actually running in production versus what the diagram claims. The AI knows none of that, and it can't, because none of it lives in the code. It's context you carry in your head from having been burned before.
The four rules I paid $14,000 to learn
I didn't stop using AI after this. It genuinely makes me about five times more productive. But my workflow changed, hard:
- Cost constraints go in the prompt first, before anything else. Spot where possible, hard ceilings everywhere, budget as a first-class requirement instead of an afterthought.
- Every AI-generated Terraform module gets a cost estimate before it gets a plan. No exceptions.
- Treat AI code exactly like a junior engineer's PR. Trust, but read every line. The AI is fast, confident, and occasionally very wrong, same as a talented junior.
- The more critical the system, the more human oversight it needs. Blast-radius limits on every resource, and nothing touches production until a real person has read it top to bottom.
Copilot, not autopilot
Here's the sentence I keep coming back to. AI made me five times more productive, and it also almost bankrupted a client in 48 hours. Both of those are true, and they belong in the same sentence.
That's the whole lesson. AI is a copilot, not an autopilot. $14,000 turned out to be cheap tuition for learning the difference, and I'd rather you learn it from my invoice than your own.
So: do you review AI-generated infrastructure the same way you'd review a junior's PR? Or do you quietly trust it more, because the tests were green and the code looked clean?