Introduction
Cloud computing services have become popular web hosting platform. Scalable within minutes, high availability, and very affordable; they are a great platform for launch new websites. This guide will cover the basics of hosting a website with Amazon Web Services. For more information read, the Cloud Web Hosting: A Comparison.
Amazon Web Services

Amazon Web Services (AWS) was created to allow you, the developer, to focus completely on your application. It utilizes Amazon’s robust cloud computing infrastructure, eliminating the burden of server deployment, bandwidth management, network infrastructure, and other expensive data center issues. In essence, it allows you to utilize the same infrastructure that Amazon uses to run its own global network of web sites.
To host our website we will use three AWS offerings:
- Electric Cloud Compute (EC2)
- EC2 is a web service that provides resizable, pay as you go, compute capacity on Amazon’s enterprise cloud.
- Elastic Block Store (EBS)
- Amazon Elastic Block Store (EBS) provides highly reliable storage volumes that persist independently from the life of an instance.
- Simple Storage System (S3)
- Amazon S3 provides a simple interface that can be used to store and retrieve huge amounts of data quickly and reliably, for dirt cheap.
For detailed information visit Amazon Web Services Overview.
[Image: EC2 -> EBS -> S3]
Hosting a website with AWS is fairly straightforward. Will we create a EC2 Instance (the web server), attach an EBS volume (persistent storage), and configure the hosting software (Apache/MySQL)! Easy.
Create EC2 Instance
- Log into the AWS Management Console
- Select a pre-configured Amazon Machine Image (AMI)
- We will be using the Fedora LAMP Web Starter (AMI ID: ami-25ey004c).
- Create Key Pair
- Configure Firewall
- Launch
- Select 1 Small Instance. Note the Availability Zone and Key Pair Name.


Create EBS Volume
EC2 Instances are virtual. Each time an instance is terminated, it is reloaded fresh from an AMI image. This is the same as re-formatting a server every time. Thus, EBS was introduced to provide persistent storage volumes that can be attached to EC2 instances. Think of it as an external hard drive of sorts.
- In the AWS Management Console, select Elastic Block Store > Volumes
- Create new volume
- 1 GB Volume Size
- Ensure the availability zone of volume matches the AMI instance (us-east-1a)

- Attach EBS onto AMI instance
- Mount on device sdf

Configuring the Server
- Log in
- Download keypair , Putty , PuttyGen
- Turn Amazon key into Putty file with PuttyGen
- Configure Putty
- Log in
- Prepare EBS Volume
- mount EBS volume
[img]
- partition
fdisk /dev/sdj- …
- format
mkfs ext3 /dev/sdj1
- finalize
fsck -f -y /dev/sdj1
- Apache
- Symlink
- delete default folder
- symlink to www folder
- MySQL
- edit my.cnf
- point datadir to mounted ebs volume

sweeeet
Thanks for the Article, I’ll need this in a few days
thanks for writeup. where does s3 comes in play, where is it used?
I was just talking with my buddy about the possibility of running a blog on AWS. Thanks for this detailed article.