How do I delete a Route 53 hosted zone created by service discovery?

2 minute read
0

I want to delete an Amazon Route 53 (Route 53) hosted zone created by service discovery in the console. However, when I try to delete the hosted zone, I receive an error.

Short description

Hosted zones that are created by service discovery can't be deleted from the Route 53 console. Hosted zones created by service discovery can be deleted through either the AWS Cloud Map console or a servicediscovery API call.

Resolution

Before you can delete a namespace, you must delete all services that were created in the namespace and deregister instances that use the service.

Find the namespace in AWS Cloud Map

To find the namespace associated with the hosted zone that you want to delete, complete the following steps:

  1. Open the AWS Cloud Map console.
  2. Choose the Region where the namespace was created.
  3. In the navigation pane, choose Namespaces.
  4. Select the namespace associated with the hosted zone that you want to delete.

Remove all associated services

To manually deregister all instances from a service and delete all services, complete the following steps:

  1. From the Services section, select a service name.
  2. Select each instance in the Service instances list and then choose Deregister.
  3. After you've deregistered all instances from the service, choose Delete at the top right of the service page.

Repeat these steps for each associated service until all services are deleted.

Delete the namespace

After all services are deleted, you can delete the namespace. To do delete the namespace, complete the following steps:

  1. Choose Delete at the top right of the namespace page.
  2. Choose Delete in the confirmation window.

When you delete the namespace, the associated Route 53 hosted zone is automatically deleted.

AWS OFFICIAL
AWS OFFICIALUpdated 5 months ago