Wednesday, August 18, 2010

Every Wondered How to launch a linux Instance automatically ?

I don't know about you, But whenever we need to launch an Instance the only option I could see is to login to the AWS console and select the AMI and then follow the usually process .Now the following command can come to your rescue .

ec2-run-instances AMI [-n INSTANCE_COUNT] [-g GROUP [-g GROUP ...]] [-k KEY] [-d USER_DATA | -f FILE_NAME]

Now if you observe the only important option that is not present is the Launch zone
viz. US-EAST..etc .Hence this is what you can do use "-Z" option as follows

$ec2-run-instances ami-xxxxxxxx -z us-east-1a

The above command will allow you to specify the launch zone so that you can safely attach the storage once its up.Amazon are you Listening why haven't you mentioned this on your website ."http://docs.amazonwebservices.com/AmazonEC2/dg/2006-10-01/CLTRG-run-instances.html"

No comments: