LoginSignup
0

More than 3 years have passed since last update.

Fargate ServiceDiscovery機能によって作成されたHostZonesを削除する

Posted at

概要

FargateのServiceDiscovery機能を有効にした際に自動的に作成されるRoute53上の .local というHostZonesの削除方法を記載します。

手順

aws servicediscovery --profile (ご自身のprofile名) list-services
aws servicediscovery --profile (ご自身のprofile名) delete-service --id (上記で表示されたServiceId)
aws route53 --profile (ご自身のprofile名) list-hosted-zones
{
    "HostedZones": [
        {
            "Name": "local.",
            "Config": {
                "Comment": "Created by AWS Cloud Map namespace with ARN arn:aws:servicediscovery:ap-northeast-1:190063289881:namespace/ns-xoyphpqpt3lyki5r", *
                "PrivateZone": true
            },
            "LinkedService": {
                "ServicePrincipal": "servicediscovery.amazonaws.com",
                "Description": "arn:aws:servicediscovery:ap-northeast-1:190063289881:namespace/ns-xoyphpqpt3lyki5r"
            },
            "CallerReference": "qc2tsqsuyrajag2d3s4jyllzyjtyz25t-ju56hm0a",
            "ResourceRecordSetCount": 2,
            "Id": "/hostedzone/Z177BH0WQDGIR8"
        }
    ]
}
aws servicediscovery --profile (ご自身のprofile名) delete-namespace --id (上記で表示されたNameSpaceId)
aws route53 --profile (ご自身のprofile名) list-hosted-zones

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0