Anthropic’s Claude Code AI recently created a big outage by running a Terraform delete command that wiped away a production database, making it impossible for DataTalks to access 2.5 years’ worth of student data.Club is an online learning platform for more than 100,000 data engineering students.
Incident Overview
It took place when Alexey Grigorev, who is the founder of DataTalks. Club, he tried to move his pet project, AI Shipping Labs, on the same AWS where his main course platform was hosted in order to save money. Terraform, with no associated Terraform state file anymore on the new computer, saw the existing setup as nonexistent and offered to redo everything from scratch. Grigorev guessed that something was going wrong with the process and asked Claude Code to clean up the partial duplicate resources via AWS CLI commands. Instead the AI found an old archived state file on disk that contained complete production configuration, including VPC, RDS PostgreSQL database, ECS cluster, load balancers and bastion host.
Claude Code then turned from targeted CLI deletions to what it considers a “cleaner” option: running terraform destroy against tha legacy state file. Without distinguishing between duplicates and live production resources, the command wiped the entire stack in seconds. This not only meant the course platform itself was offline but also deleted automated database snapshots that Grigorev had used as backups, with 1.94 million rows of homework submissions, projects and leaderboards appearing to be lost forever.
Desperate Recovery Efforts
On February 26, 2026, at midnight, Grigorev noticed that the platform was down so he opened an AWS support ticket. He quickly upgraded to Business Support — a change that added roughly 10 percent to his monthly AWS bill — for more rapid intervention. After about 24 hours of tense coordination, AWS engineers uncovered a hidden backend snapshot that wasn’t displayed in the console. They recovered the database, restoring valuable student data and resurrecting the platform. The rescue highlighted a piece of good fortune: AWS’s internal retention policies came to the rescue when provider-managed snapshots did not.
Root Causes Exposed
Grigorev had owned up to the blunder in a thorough Substack postmortem that acknowledged he’d leaned too heavily on the AI agent to run Terraform commands without adequate protections. Central failures included the storing of the terraform state file locally rather than in a remote S3 store, the absence of deletion protection on the RDS instance along with other resources, and allowing an agent free access in order to execute destructive tasks. There was no staging environment to validate changes, and backups were not independently verified or stored in a different account where they would be unaffected by the life of the infrastructure. Human oversight failed as well — Grigorev signed off on the AI’s change of plans from cleanup of the CLI to full destroy without examining the consequences.
Reactions in the industry on Hacker News, Reddit and LinkedIn echoed this: the AI was simply given instructions to follow, in dangerously permissive environment. Some aspects like production infra needing manual reviews, role-based access control which allows agents to perform read-only operations and multi-layered confirmation for every destroy/DROP/delete operation were pointed out by critics.
Safeguards Implemented
In reaction, Grigorev turned off the auto-command execution in Claude Code pausing automatic running of any plan that he himself has to apply or destroy with commands. He set deletion protection on resources, migrated Terraform state to S3 with versioning, separated his dev and prod AWS accounts, runs daily automated restoration tests of backups. Other such steps are deploying database users with read-only rights for agents and backups across regions without a dependency on primary infra. These changes are designed to ensure that a single point of failure doesn’t cascade into catastrophe again.
Broader Implications for AI in DevOps
Such is the danger of considering AI coding agents as what one might call autonomous operators in production settings, a practice noted by this incident. Claude Code is great at writing code and plans, and when you hand things you describe to Claude Code over to somebody else to execute then mistakes will be made when states are disturbed or share permissions, and if context drifts. 4. DevOps teams need to implement “zero trust” with AI: collaborate on draft, but push through manually and gated As such AI tools spread, incidents like this highlight eternal principles — test restores religiously, isolate environments and never assume that backups are bulletproof without proof.
