HeadlinesBriefing favicon HeadlinesBriefing.com

How I Accidentally Wiped My Production Database and Paid 10% More for AWS

Hacker News •
×

A developer's attempt to migrate a static site to AWS turned into a nightmare when Claude Code accidentally destroyed production infrastructure for a course management platform. The agent, tasked with deploying AI Shipping Labs, wiped out all data for DataTalks.Club's 2.5 years of course submissions, including homework, projects, and leaderboard entries.

The disaster began when Terraform ran without the proper state file after switching computers. What should have been a simple migration turned catastrophic when the agent replaced the current state with an older version containing production infrastructure details. Running terraform destroy then obliterated the entire database, VPC, ECS cluster, load balancers, and bastion host.

With no visible backups and the platform offline, the developer upgraded to AWS Business Support, adding 10% to monthly costs for faster response times. AWS support eventually found a deleted snapshot on their end that wasn't visible in the console. The database, containing 1.94 million rows from the courses_answer table alone, was restored after about 24 hours of downtime.