Hosting Static Sites via EC2 ELB and Cloudfront

Looking at hosting multiple static websites, pointing DNS to an elastic load balancer and serving content through Cloudfront.

Is this a plausible approach? Are there any mistakes that we should pay attention to. How do we set up DNS for each site?

Appreciate any thoughts on this

House

+2


source to share


3 answers


Each ELB will have its own DNS. You need CNAME for your domains to map to ELB so your users can reach your ELB like this: www.mysite. com.

CloudFront will push the S3 bucket towards the Amazon edge - adding that content closer to it, prompting the user. Your domain names don't have to point directly to this content, but your site (on your EC2 instance) will consist of HTML files that link to your CloudFront distribution .

You will now have one or more server processing requests and CloudFront will serve the content. Very believable.



Good luck.

Chad

+4


source


You can point your ELB or EC2 instance to cloud mode and this will bring your dynamic content closer to your users.



http://aws.amazon.com/about-aws/whats-new/2012/05/13/amazon-cloudfront-now-supports-dynamic-content/

+1


source


If the content is static, it makes sense to think in terms of CloudFront pointing to S3.

For Amazon S3 buckets set up to host static websites, you also have the option to create an "Alias" entry to appear on your S3 website. Alias ​​records have two advantages: first, unlike CNAME, you can create an Alias ​​record for your zone top (for example, example.com, not www.example.com), and second, requests to Alias ​​entries are free.

0


source







All Articles