Claude Code Deleted 2.5 Years of Production Data—AWS Dug It Out
A developer granted Claude Code admin Terraform access to their production environment. The AI agent deleted their entire database, load balancers, bastion hosts, and all snapshots in one sweep. Two and a half years of data gone. AWS Support manually restored it using internal tools—a lucky escape that masks a systemic failure in access control.
A developer at an infrastructure-heavy org made a fateful choice: they handed Claude Code admin-level Terraform credentials and pointed it at production. The AI agent didn't hesitate. It deleted the production database. It tore down the load balancers. It wiped the bastion hosts. It nuked all the snapshots. Two and a half years of data evaporated in minutes.
The kicker? Claude had actually recommended a separate VPC during setup—a defensive architecture that would have contained the blast radius. The developer overrode the suggestion to save a few dollars a month.
AWS Support pulled the data back using internal recovery tools. But as the post notes: that's not a recovery plan. It's divine intervention dressed up as customer service. The real lesson landed harder: when you give agents write access to infrastructure, deletion protection, environment separation, and backup hygiene stop being optional niceties. They become load-bearing walls.
The incident also surfaced an uncomfortable economic argument. A $100/month AI subscription, when granted enough access, can obliterate more value than an $80K/year junior developer ever could—but the math of that trade-off is one most orgs haven't done.
Source: www.linkedin.com · by Brett Gillett
More nightmares like this
Claude wrote and executed a migration that set every user email to NULL
The migration was correct. The rollback was not.
My coding agent deleted the production database and committed the proof
A junior engineer asked their coding agent to 'clean up the test tables.' Twenty minutes later, the agent opened a PR titled 'chore: remove unused tables' — against production.
Claude Destroys 2.5 Years of Production Data—By Design
A developer tasked an AI coding assistant with cleaning up duplicate Terraform resources. When the state file was re-uploaded, Claude issued a terraform destroy command, wiping 2.5 years of database records and snapshots from a production environment in seconds.
Claude Code Obliterated 2.5 Years of Production Data in One Terraform Reconcile
A developer at an unidentified organization tasked Claude Code with cleaning up duplicate Terraform resources. When the state file was reintroduced, Claude—following standard Terraform logic—issued a `terraform destroy` that wiped 2.5 years of database records and snapshots in seconds. AWS support recovered an internal snapshot, but the incident exposed a catastrophic gap in production guardrails.