Building A Highly Available and Scale able Architecture on AWS Cloud


Temporary EC2 Instance. ( OS, Web/App Server, Application)
Amazon Machine Image (AMI)
Elastic Load Balancer (ELB)
Auto Scaling Group (ASG)
Launch Configuration (LC)
Scaling Policies (SP)
Cloud Watch (Metrics, Alarms to trigger SP)


1) To begin with, we need to customize an instance to house the application stack.

2) Once the instance that houses the application is configured tested and fine tuned, we can build an image of this instance application stack (OS, Web Server, App).We will require this image-id when we create an Auto Scaling Group.

3) We can create a Load Balancer (ELB) as a service using the AWS GUI Console.
Set up the ELB API Tools on an instance. we need these since we cant customize all parameters through     theGUI. One of the main things we need to do with these tools is to enable the ELB to route traffic across     Availability zones belonging to a single region.

4) Setup the Auto Scaling Group API tools.

5) Create the Auto Scaling Group, Launch Configuration, Scaling Policies.

6) Test the Application setup by accessing the ELB A record from the browser.

Now we will look at these steps in detail1 & 2) The first two steps will depend on the application type. But as a minimum we need an image that bundles and OS an a web server.

3) Create an ELB from the console and note its name
Next we need to enable the Load Balancer to route traffic to the required availability zones (where theASG instances have been configured to launch)We cannot do this through the AWS console. So one alternative is to configure the ELB through the AWS ELB API Tools.To set this up refer to the same steps in my previous blog with the below changes.
Download the Toolwget –quiet      Set the Environmental Variable                         
export AWS_ELB_HOME=”/home/ubuntu/ElasticLoadBalancing-″
Enable the Load Balancer to route traffic to required availability zones.
./elb-enable-zones-for-lb ELBTest –availability-zones us-east-1a,us-east-1b,us-east-1c,us-east-1d,us-east-1eAVAILABILITY_ZONES  us-east-1d,us-east-1c,us-east-1e
So Now we can route traffic from ELB to the availability zones.

4 & 5) AWS has now provided the option to create ASGs through the GUI console. But if you need more control of the ASG or need to write a menifest use the ASG API Tools.
All your queries are welcome in the comments section of this post.