Get all A Records from route 53 using CLI and export to CSV

0

I've been trying to get all the listed A records on our system due to us having a mismatch between our instances and the number of A records we have. I have asked in numerous places and look online and it seems to be quite difficult to do. I either get only a partial listing or a listing with out extraneous information.

What would be an aws cli command to get only a records

1 Respuesta
2

There isnt a way to do this natively

You can try this cli command (from here)

aws route53 list-resource-record-sets --hosted-zone-id "/hostedzone/Z#################" | jq -r '.ResourceRecordSets[] | [.Name, .Type, (.ResourceRecords[]? | .Value), .AliasTarget.DNSName?] | @csv'

You may have issues if there are more than 1000 record sets as you will hit the pagination limit.

You can also try a third party too like cli53 that can export the zone to BIND format

profile pictureAWS
EXPERTO
Matt-B
respondido hace 2 años
profile pictureAWS
EXPERTO
Chris_G
revisado hace 2 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas