Skip to content

Instantly share code, notes, and snippets.

@technion
Created June 6, 2018 02:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save technion/664c8655df8a7b781d4f5518b8c1a540 to your computer and use it in GitHub Desktop.
Save technion/664c8655df8a7b781d4f5518b8c1a540 to your computer and use it in GitHub Desktop.
Export all Route 53 zones
#!/usr/bin/env ruby
zones = `./cli53-linux-amd64 l --profile d53`.lines
zones.each do |zone|
domain = zone.split(/\s+/)[1]
`./cli53-linux-amd64 export #{domain} --profile d53 > #{domain}.zone`
puts domain
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment