0

I have a zone in Route53 that I need in a BIND-compatible format.

How can I convert it?

1 Answer 1

0
aws route53 list-resource-record-sets --hosted-zone-id «zoneid» | \
 jq -r '.ResourceRecordSets[] | "\(.Name) \(.TTL) IN \(.Type) \(.ResourceRecords[] | join("\n"))"'

example output:

contoso.com. 300 IN A 192.0.2.42
contoso.com. 300 IN A 198.51.100.0.42
contoso.com. 300 IN AAAA 2001:db8:1234::
contoso.com. 300 IN AAAA 2001:db8:5678::
contoso.com. 172800 IN NS ns-1273.awsdns-31.org.
contoso.com. 172800 IN NS ns-729.awsdns-27.net.
contoso.com. 172800 IN NS ns-367.awsdns-45.com.
contoso.com. 172800 IN NS ns-1816.awsdns-35.co.uk.
contoso.com. 900 IN SOA ns-1273.awsdns-31.org. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400
www.contoso.com. 300 IN A 192.0.2.42
www.contoso.com. 300 IN A 198.51.100.0.42
www.contoso.com. 300 IN AAAA 2001:db8:1234::
www.contoso.com. 300 IN AAAA 2001:db8:5678::

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .