title: aws boto route53 adding an alias for a bucket
body: <p>I am working on a script that creates a website bucket and then assigns dns entries to it.</p>
  
  <p>I have no idea how to assign the proper ALIAS record to the apex so that it points to the bucket.</p>
  
  <p>This function is takes in an r53 connection, the zone object, and a dict with the bucket objects. It tries to add the proper records to the zone.</p>
  
  <p>How would I go about correctly creating dns entries that would forward to the buckets?</p>
  
  <p>Note that the www bucket forwards to the apex.</p>
  
  <pre class="lang-python prettyprint-override"><code>def create_website_records(r53,zone,buckets):
    records = r53.get_all_rrsets(zone.id)
    change = records.add_change('CREATE', zone.name, 'A',alias_hosted_zone_id=buckets['apex'])
    change.add_value('%s' % buckets['apex'].get_website_endpoint())
    change = records.add_change('CREATE', 'www.' + zone.name, 'CNAME')
    change.add_value('%s' % buckets['www'].get_website_endpoint())
    records.commit()
    return records
  </code></pre>