Alex Rivera | Logout

Alternative tools for Amazon EC2?

Asked 2009-04-09T06:11:28.650
9

Amazon's official tools for interacting with EC2 are kind of clunky and a pain to deal with. I have to set up a bunch of environment variables, store separate private keys just for EC2, add extra items to my PATH, and so on. They all output tab delimited lines that are hundreds of characters long with no headings, so it's a bit of a pain to interpret them. Their instructions for setting up an SSH keypair give you one that isn't protected by a passphrase, rather than letting you use an existing keypair that you already have. The programs are all just a bit clunky and aren't very good Unix programs.

So, are there any easier to use command line tools for accessing EC2? I know there is ElasticFox, and there is their web based console, which do make the process easier, but I'm wondering if anyone else has written better command line tools for interacting with EC2.

Edit
Report

2 Answers

1

About ec2-api-tools:

I agree that they are a bit too clunky, I particular dislike the output of ec2-describe-instances. I recently switched to python-boto which offers a very clean and easy to use interface to ec2.

About not being able to specify a passphrase for the ssh key generated by EC2:

That's not the case. You can change the passphrase of any ssh private key anytime, using:

ssh-keygen -p -f /path/to/keyfile

E.g.

ssh-keygen -p -f ~/.ssh/id_rsa

About uploading your own ssh key pair:

You can use ec2-import-keypair, like this:

for i in $(ec2-describe-regions|cut -f 2);do
  ec2-import-keypair --region $i mykey --public-key-file ~/.ssh/id_rsa.pub
done

The example above will upload the public key in ~/.ssh/id_rsa.pub to every region under the name "mykey". Remember that each region has it's own keypair.

In order to have the key installed in your ec2 instances, you'll have to pass the "-k mykey" option to ec2-run-instances.

Incidentally, uploading your own keypair is the only way to login with the same key to all the instances in all regions. If you create the keypair from the web interface, you'll have a different key in every region.

answered 2012-11-03T23:30:01.627
0

There is an entire industry called Cloud Management which try to solve this type of problems. Scalr and RightScale and the leaders in this sector (disclaimer: I work at Scalr).

Cloud management softwares are built on top of Amazon EC2 API (and usually on other public IaaS like Rackspace) and provide an improved user interface along with automation tools like backups or SSH management as you mentioned it. They don't provide easier command lines tools stricto sensu. Their goal is to make interaction with Amazon EC2 easier.

Different options are available in the market:

  • Scalr: Scalr is available as a hosted service with a trial version. Otherwise you can download and install the source code yourself, as it is released under the Apache 2 license.
  • RightScale: while they are usually considered as expensive for small businesses, they do offer a free account.
  • enStratus: they offer a freemium model like RightScale.
answered 2012-03-26T23:09:32.743

Your Answer