How do I delete a Route 53 hosted zone created by service discovery?
Last updated: 2019-06-10
I'm trying to delete an Amazon Route 53 (Route 53) hosted zone created by service discovery in the Amazon Web Services (AWS) console. However, I'm receiving an error. How do I delete a Route 53 hosted zone created by service discovery?
Hosted zones that were created by service discovery can't be deleted from the Route 53 console. Hosted zones created by service discovery can only be deleted using the AWS Cloud Map console, or a servicediscovery API call. Remember:
- Before you can delete a namespace, you must delete all services that were created in the namespace.
- Before you can delete a service, you must deregister all instances that were registered using the service.
Find the namespace in AWS Cloud Map
- Open the AWS Cloud Map console.
- In the navigation pane, choose Namespaces.
- Select the namespace associated with the hosted zone you want to delete.
Remove all associated services
- Select a service name from the Services section.
- Select each instance in the Service instances list and choose Deregister.
- After you've deregistered all instances from the service, choose Delete at the top right of the service page to delete the service.
Repeat these steps for each associated service until all services are deleted.
Delete the namespace
- After all services are deleted, choose Delete at the top right of the namespace page to delete the namespace.
- Choose Delete in the confirmation window.
When you delete the namespace, the associated Route 53 hosted zone is automatically deleted.