dcg

AWS Route53

dns.route53

Protects against destructive AWS Route53 DNS operations like hosted zone deletion and record set DELETE changes.

  • 6blocking rules
  • 4safe patterns
  • 1Critical
  • 4High
  • 1Medium
~/.config/dcg/config.toml
[packs]
enabled = ["dns.route53"]

Evaluated when a command contains aws, route53.

Blocking rules

Each rule ID is dns.route53:<name>. Use it in allowlists and [policy.rules].

  1. route53-delete-hosted-zone

    Critical

    aws route53 delete-hosted-zone permanently deletes a Route53 hosted zone.

    Explanation
    Deleting a hosted zone removes ALL DNS records for that domain. Services, websites, and email that depend on these records will become unreachable. The zone must be empty (except NS/SOA) before AWS allows deletion. Safer alternatives: - aws route53 list-resource-record-sets to review records first - Export zone to file before deletion - Delete individual records instead of the entire zone
  2. route53-change-resource-record-sets-delete

    High

    aws route53 change-resource-record-sets with DELETE removes DNS records.

    Explanation
    DELETE actions in change-resource-record-sets immediately remove DNS records. DNS caching may provide brief respite, but resolvers will fail to reach your services once caches expire (often within minutes for low TTL records). Safer alternatives: - Use UPSERT action to modify rather than delete and recreate - Test changes in a non-production hosted zone first - Use aws route53 list-resource-record-sets to verify record state
  3. route53-delete-health-check

    High

    aws route53 delete-health-check permanently deletes a Route53 health check.

    Explanation
    Deleting a health check can disrupt DNS failover. If records reference this health check, Route53 may route traffic to unhealthy endpoints or stop failover entirely, causing outages. Safer alternatives: - aws route53 get-health-check to review configuration first - Check which records use this health check before deletion - Update dependent records to use a different health check first
  4. route53-delete-reusable-delegation-set

    High

    aws route53 delete-reusable-delegation-set permanently deletes a reusable delegation set.

    Explanation
    Deleting a reusable delegation set affects all hosted zones using it. If domain registrars point to these name servers, DNS resolution will fail for all associated domains until registrar records are updated. Safer alternatives: - Check which hosted zones use this delegation set first - Migrate zones to a different delegation set before deletion - Update domain registrar NS records after any changes
  5. route53-delete-traffic-policy

    High

    aws route53 delete-traffic-policy permanently deletes a Route53 traffic policy.

    Explanation
    Deleting a traffic policy removes the routing logic. Policy instances (applied to hosted zones) will fail to update or may stop working. This can disrupt geo-routing, latency-based routing, or weighted distributions. Safer alternatives: - aws route53 list-traffic-policy-instances to check usage first - Create a new policy version instead of deleting - Delete policy instances before deleting the policy itself
  6. route53-delete-query-logging-config

    Medium

    aws route53 delete-query-logging-config removes a Route53 query logging configuration.

    Explanation
    Deleting query logging stops DNS query visibility for that hosted zone. This can impact debugging, security monitoring, and compliance auditing. Historical logs in CloudWatch remain, but new queries will not be logged. Safer alternatives: - aws route53 get-query-logging-config to review before deletion - Disable logging temporarily by updating the config instead - Ensure CloudWatch log retention meets compliance needs

Safe patterns

Checked first. A command that matches one is never blocked by this pack.

  • route53-list-hosted-zones
  • route53-list-resource-record-sets
  • route53-get-hosted-zone
  • route53-test-dns-answer