Skip to content

Instantly share code, notes, and snippets.

@thinkdevcode
Created November 18, 2012 18:18
Show Gist options
  • Save thinkdevcode/4106633 to your computer and use it in GitHub Desktop.
Save thinkdevcode/4106633 to your computer and use it in GitHub Desktop.
Route53 create record set example
r53 = AWS::Route53.new(
:access_key_id => 'KEY_ID',
:secret_access_key => 'ACCESS_KEY')
host_zone_id = "ZONE_ID"
resp = r53.client.change_resource_record_sets({ :hosted_zone_id => host_zone_id, :change_batch => {
:comment => "Creating new subdomain for user: #{name}", :changes => [{
:action => "CREATE", :resource_record_set => {
:name => "#{name}.bleku.com",
:type => "CNAME",
:ttl => 300,
:resource_records => [{
:value => "www.#{name}.com/"
}]
}
}]
}})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment