Skip to content

Instantly share code, notes, and snippets.

@rrobby86
Created February 22, 2021 11:19
Show Gist options
  • Select an option

  • Save rrobby86/1d652eb6ee9c8d8e27c948084e7d05f2 to your computer and use it in GitHub Desktop.

Select an option

Save rrobby86/1d652eb6ee9c8d8e27c948084e7d05f2 to your computer and use it in GitHub Desktop.
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":.}
@dsadinoff
Copy link

strong work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment