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.


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

  • I tried your way but when I type as-cmd I get an error msg which says "command not found" that means I am not able to set the PATH for EC2_HOME, – Jeevan Dongre Jan 5 '12 at 5:58
  • Jeevan Dongre: If you are getting "command not found" then you have not followed the instructions above. – Eric Hammond Jan 9 '12 at 18:15
  • hey its done I followed your instructions, thank you very much. – Jeevan Dongre Jan 10 '12 at 4:41
  • Hey @Eric Hammond: How Do I scale depending upon the Memory Utilization, I am trying to figure it out, since long, can u help – Jeevan Dongre Jan 10 '12 at 6:51
  • Jeevan Dongre: Please ask new questions as a new question so other readers can see it and help out. – Eric Hammond Jan 10 '12 at 22:37

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

  • 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 4 '12 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.