Is it possible to use AWS as a web host?

57,843

Solution 1

EDIT: Aug 12, 2016 they have a dedicated section on how to get started hosting a website on AWS. Please note S3 only allows STATIC websites but AWS provides SDKs in case you want to run PHP, ASP.NET, etc on your instance. See the links for more details.

http://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html https://aws.amazon.com/websites/


So guess what I just found while doing some Google searches for hosting on AWS?! A blog post by the AWS stating that you can (now) host a website on S3. (Funny enough, the StackOverflow and the AWS post were right next to each other in the SERPs!)

http://aws.typepad.com/aws/2011/02/host-your-static-website-on-amazon-s3.html

Solution 2

AWS = Amazon Web Services = a suite of different web services.

S3 (which you linked to) is an object store. You can't host a web service on S3.

EC2, also under the AWS umbrella, is virtualized compute space. You CAN host a web service on EC2. It is just like having a server in a rack somewhere, except that when you shut down an instance, it is gone forever. But using EBS, which is like a virtualized hard drive, will prevent you from losing your data when the EC2 instance shuts down.

See http://aws.amazon.com/ec2/ and http://aws.amazon.com/ebs/

Solution 3

Yes it is completely possible to host websites on AWS in 2 ways:

1.) Easy - S3 (Simple Storage Solution) is a bucket storage solution that lets you serve static content e.g. images but has recently been upgraded so you can use it to host flat .html files and your site will get served by a default Apache installation with very little configuration on your part (but also little control).

2.) Trickier - You can use EC2 (Elastic Compute Cloud) and create a virtual Linux instance then install Apache/NGinx (or whatever) on that to give you complete control over serving whatever/however you want. You use SecurityGroups to enable/disable ports for individual machines or groups of them.

@danben your EC2 instance does not have a constant public IP by default. Amazon makes you use a CNAME - not an A record as your IP may change under load. You have to pay for an ElasticIP to get a consistent public IP for your setup (or use some sort of DynDNS)

Solution 4

As @danben mentioned, there is a difference between S3 and EC2.

One thing that may be interesting for people looking to host a website on Amazon, specially if they want to start small is that Amazon started offering a free tier some months ago. Together with services like BitNami Cloud Hosting (disclaimer, I helped design it, so it is a bit like my baby :) means you can get your site on the Amazon cloud in just minutes, for basically 0 dollars. You still need to give credit card info to Amazon, but it will not be charged if you stay within the limits of their free tier.

One thing to consider too is that at the time of writing this (Jul 2011), Amazon restricts you to one IP address per server. If you need to host multiple domains, you may need to use name-based virtual hosts or some tricks using their Elastic Load Balancer (which will cost you more). But all in all, it is worth a try if you are a bit technical and want more control than what shared hosting provides you

Share:
57,843
Matrym
Author by

Matrym

Updated on July 30, 2022

Comments

  • Matrym
    Matrym almost 2 years

    Is it possible to load / host an entire website using AWS? Or is it only a service that can load specific pieces of a website - such as images, etc. Obviously, I'd want to use my own domain. If you can use it, are there any limitations?

    Here's the AWS link, for context:

    http://aws.amazon.com/s3/

  • OscarRyz
    OscarRyz over 14 years
    When is an EC2 instance shut down?
  • Matrym
    Matrym over 14 years
    So, to be totally clear... you can point a domain to EC2 and have it resolve within the cloud somehow?
  • danben
    danben over 14 years
    @Oscar Reyes: An instance is shut down when you choose to shut it down.
  • danben
    danben over 14 years
    @unknown (google): Yes, your EC2 instance will have a publicly available IP address. You just need to make sure it's got port 80 open.
  • OscarRyz
    OscarRyz over 14 years
    Oh.. as per your description, I initially thought it was something that may just suddenly happen.
  • Johnny
    Johnny over 2 years
    You can, but I think that generally, it would be cheaper to host a site on a dedicated site hosting (and a non EIG one).