How it works...

To summarize, we did the following in this recipe:

  1. We created an S3 bucket as a static website (for example, qnatime.com)
  2. We created another S3 bucket, with a WWW prefix, as a static website (for example, www.qnatime.com)
  3. We added the files index.html and error.html
  4. We added a bucket policy that allows for everyone to read the bucket
  5. We created alias records for the primary domain and the WWW sub-domain, pointing to the S3 buckets (with and without a WWW prefix, respectively)

The S3 bucket names for static websites have to match the domain names exactly. For example, qnatime.com should point to a bucket named qnatime.com, and www.qnatime.com should point to a bucket named www.qnatime.com. Therefore, if someone has taken that bucket name, then you will not be able to use a custom domain to point to an S3 bucket. You can, however, overcome this limitation with the help of CloudFront, as you will see in a later recipe.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.148.103.210