Command
aws route53 list-hosted-zonesExplanation
Displays hosted DNS zones configured in Amazon Route53, including their IDs and associated domain names.
Common Use Cases
- •Managing DNS configurations
- •Verifying zone existence before record updates
Best Practices
- ✓Document hosted zone IDs for automation scripts
- ✓Use descriptive zone names for clarity in multi-account setups
Common Mistakes to Avoid
- ⚠Using region flag (Route53 is global service)
- ⚠Not having `route53:ListHostedZones` permission
Troubleshooting
Problem: Empty output
Solution: Verify that hosted zones exist in your AWS account.
Examples
List all hosted zones
aws route53 list-hosted-zonesList hosted zone for specific domain
aws route53 list-hosted-zones-by-name --dns-name example.com