Skip to content

Instantly share code, notes, and snippets.

@nascimento
Created July 20, 2015 19:11
Show Gist options
  • Save nascimento/5a5dc9bc976142b2a650 to your computer and use it in GitHub Desktop.
Save nascimento/5a5dc9bc976142b2a650 to your computer and use it in GitHub Desktop.
AWS SDK Route 53 list zone entries.
require 'aws-sdk'
route53 = Aws::Route53::Client.new(
region: 'sa-east-1',
access_key_id: 'xxxxxx',
secret_access_key: 'xxxxxx'
)
response = route53.list_resource_record_sets(
:hosted_zone_id => "xxxxxx",
)
puts response[:resource_record_sets].map{|r| r[:name]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment