How to Delete Route53 zone created by ECS service discovery

4 2,023

Issue: When trying Route 53 private hosted zone getting error

The resource hostedzone/Z1OWcan only be managed through (arn:aws:servicediscovery:us-east-1:561660628307:namespace/ns-c6lvlchj2gbcsobc)

Resolution: Route 53 hosted zone created by ECS service discovery can’t be deleted through AWS console, you would need AWS CLI for it

  1. Using the aws-cli have a look at:
    $ aws servicediscovery list-services
    $ aws servicediscovery list-namespaces
  2. If there are services hanging around the in the NS you cant delete then you could try:
    $ aws servicediscovery delete-service --id=ID-FROM-LIST
  3. Then when you have no services left in the NS you could:
    $ aws servicediscovery delete-namespace --id=NS-LIST
  1. Rawin says

    $ aws servicediscovery list-namespaces

    I guess you missing this command after you deleted the service

    1. Dabeer Shaikh says

      Thank you!

  2. Prathiba says

    It is very simple if you have access to console

    Search for “AWS cloud map” in aws console – > you can see than namespace – go inside namespace -> delete services -> go back and delete namespace -> check in your route53 console hosted zone wont be there

    1. Dabeer Shaikh says

      Thanks for 2nd way
      AWS Cloud Map is comparatively new, before Cloud Map AWS didn’t gave option to delete CLI was only way

Leave A Reply

Your email address will not be published.