June 5th, 2017

How to audit the configuration of the DNS entry for DNS Failover in AWS Route 52.

How to audit the configuration of the DNS entry for DNS Failover in AWS Route 52.


$ aws route53 list-resource-record-sets --hosted-zone-id Z2I27QCOOT2SB2 --query "{ResourceRecordSets:ResourceRecordSets[?Name == 'myhostlala.mydomainfofo.com.'].{HealthCheckId:HealthCheckId}}"
{
    "ResourceRecordSets": [
        {
            "HealthCheckId": "XXXXXXX-YYYY-4cdd-8400-XXXXXXXXX"
        }, 
        {
            "HealthCheckId": "XXXXXXX-YYYY-48c2-bb42-XXXXXXXXXX"
        }
    ]
}


$ aws route53 get-health-check --health-check-id XXXXXXX-YYYY-4cdd-8400-XXXXXXXXX  --query HealthCheck.HealthCheckConfig.[{Type:Type},{Port:Port}]
[
    {
        "Type": "TCP"
    }, 
    {
        "Port": 443
    }
]