
How to Delete an AWS Route 53 Hosted Zone in a Cascade Manner (Using AWS CLI)
Here’s your content formatted as a Dev.to technical blog post — structured, practical, and clean for engineers. Deleting a hosted zone in AWS Route 53 sounds simple… Until you see this error: The hosted zone contains non-required resource record sets AWS won’t let you delete a hosted zone unless all non-default records (everything except NS & SOA) are removed first. In this guide, I’ll show you how to safely delete a hosted zone in a cascade manner using AWS CLI. 📌 Why Cascade Deletion Is Required When you create a hosted zone in Amazon Route 53, AWS automatically creates: NS record SOA record These two are mandatory and cannot be manually deleted. Before deleting the hosted zone, you must: Delete all custom records (A, AAAA, CNAME, MX, TXT, ALIAS, etc.) Keep only NS and SOA Then delete the hosted zone Let’s automate that. 🛠️ Prerequisites Make sure you have: AWS CLI v2 installed jq installed IAM permissions: route53:ListResourceRecordSets route53:ChangeResourceRecordSets route53:Delet
Continue reading on Dev.to
Opens in a new tab




