Skip to content

Instantly share code, notes, and snippets.

@tiernano
Created May 7, 2015 18:59
Show Gist options
  • Save tiernano/f11fbec2075b8bf19d57 to your computer and use it in GitHub Desktop.
Save tiernano/f11fbec2075b8bf19d57 to your computer and use it in GitHub Desktop.
export from Route53 to bind files
cli53 = '/usr/bin/cli53'
zones_on_aws = `#{cli53} list`.lines.select{|e| e =~ /Name/ }.map{|e| e.split(":").last.strip.sub(/\.$/, '') }
zones_on_aws.each do | zone |
puts "#{zone}..."
system("#{cli53} export #{zone} > #{zone}.bind")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment