0

I am running micro instance, now need to horizontally scale. I mean I am experimenting with a micro instance. I followed the instructions which is given in this video, but when I run as-cmd I get an error msg which says command not found.

I have installed java run time and have also set the environment variables.

I am fighting to set up the environmental variables in an EC2 ubuntu 10.04 instance.

Jeevan Dongre
  • 741
  • 2
  • 17
  • 33

2 Answers2

2

The as-* commands would be for Auto Scaling which are for horizontal scaling, not vertical. Auto Scaling would change the number of instances you are running, not the type of a single instance.

t1.micro is great for fooling around with EC2 and for running services that get very little traffic, but as soon as you need to scale up (horizontal or vertical) I would recommend using larger instance types.

Since t1.micro instances are always EBS boot, you can vertically scale it by moving the instance to a larger/faster instance type. If you are running a 32-bit t1.micro instance, then you can move it to an m1.small or c1.medium. If you are running a 64-bit t1.micro instance, then you can move it to the larger (and more expensive) instance types.

To change the instance type (scaling vertically) the steps include:

  1. Stop the instance
  2. Change the instance type (ec2-modify-instance-attribute --instance-type)
  3. Start the instance

I've written an article which explains more and provides sample commands:

Moving an EC2 Instance to a Larger Size
http://alestic.com/2011/02/ec2-change-type

Eric Hammond
  • 11,163
  • 1
  • 36
  • 56
  • Hey @Eric I am following ur blog on alestic.com. i am trying to install ec2-api-tools on ubuntu EC2 instance which is a micro instance I need to try out how it actually works before I push it to production. But I am not able to set the env_variable in the ec2 instnace it self when ever I type as-cmd its says command not found – Jeevan Dongre Jan 04 '12 at 09:34
1

Here's how I install the Auto Scaling command line tools:

sudo mkdir -p /usr/local/aws
wget http://ec2-downloads.s3.amazonaws.com/AutoScaling-2011-01-01.zip
unzip AutoScaling-*.zip
sudo rsync -av --no-o --no-g AutoScaling-*/lib/ /usr/local/aws/lib/
sudo rsync -av --no-o --no-g AutoScaling-*/bin/ /usr/local/aws/bin/

export EC2_PRIVATE_KEY=$(echo $HOME/.ec2/pk-*.pem)
export EC2_CERT=$(echo $HOME/.ec2/cert-*.pem)
export JAVA_HOME=/usr
export EC2_HOME=/usr/local/aws
export AWS_AUTO_SCALING_HOME=/usr/local/aws
export PATH=$EC2_HOME/bin:$PATH

I drop the private key and cert into $HOME/.ec2/

The environment variables can also be placed in $HOME/.bashrc

Eric Hammond
  • 11,163
  • 1
  • 36
  • 56