Skip to content

Instantly share code, notes, and snippets.

@rrobby86
rrobby86 / route53-zone-transfer.jq
Created February 22, 2021 11:19
Route53 zone transfer jq helper
# jq script to convert output of list-resource-record-sets into valid input for change-resource-record-sets
# NS and SOA records are removed
# based on https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-migrating.html
# (aliases and domain name change are not handled)
.ResourceRecordSets|map(select(.Type!="NS" and .Type!="SOA")|{"Action":"CREATE","ResourceRecordSet":.})|{"Changes":.}