How do I delete a Route 53 hosted zone created by service discovery?
Last updated: 2019-11-18
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 be deleted only by using either 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 registered that were using the service.
Find the namespace in AWS Cloud Map
- Open the AWS Cloud Map console.
- Choose the Region where the namespace was created from the Region selector in the navigation bar.
- In the navigation pane, choose Namespaces.
- Select the namespace associated with the hosted zone that 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 then 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.