An illustration of AWS hosted zones and buckets

494 Views Asked by At

After more than a few experiments with hosted zones and buckets, it seems I'm getting failures due to unexpired caches even though I may well have set up everything correctly. Before proceeding, I'd like to summarize using two sketches the lengthy (and frankly, tedious) AWS documentation, and ask whether these are indeed correct. At this time I only care about correctness, but I'm also curious whether the two are functionally equivalent.

hosted zones and buckets

For both options I'm not documenting that:

  • the files have been uploaded and made public on the bucket mysite.com, and
  • the hosted zones also have NS and SOA records.

There is also a third method using 2 Hosted Zones, 2 Buckets, 1 Alias Record Set, and 1 CNAME that I'm leaving out.

1

There are 1 best solutions below

3
On BEST ANSWER

I would recommend:

  • In Amazon S3, create a bucket named mysite.com
  • In Amazon Route 53, create a Hosted Zone for mysite.com (and of course, purchase the domain name, or point the current domain name to Route 53)
  • In Route 53, create an A Record for the apex of mysite.com using "Alias = Yes", with the Alias Target set to the endpoint of the Amazon S3 static website hosting (eg mysite.com.s3.amazonaws.com)
  • In Route 53, create a CNAME Record for www.mysite.com and point it to mysite.com

This is similar to Option 1, but www.mysite.com would be pointing to mysite.com (rather than the reverse).