views:

1835

answers:

5

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.

+3  A: 

ElasticFox is handy for most tasks. They are occasions though that a command line tool will be better suited. I personally use boto library for python. It is very easy to script all the required operations. You can also use it to upload/download files from S3. In general, I would say that a scripting language like Python or RUby, together with a AWS library, is the best solution.

kgiannakakis
+2  A: 

Not command line, but take a look at what a free RightScale account will give you - much, much easier than command line or ElasticFox IMO.

gareth_bowles
+3  A: 

I personally use Tim Kay's Perl command line tools and haven't used original Java based API for quite some time. Excellent for UNIX environment.

Radim Marek
This tool also work well under Windows, and it also supports S3 and SQS.
+3  A: 

I'm a bit late but I have a solution!

I found the same problems with the Amazon AMI tools. They're a decent reference implementation but very difficult to use particularly when you have more than a couple instances. I wrote a replacement command-line tool as part of another project, called Rudy that answers most of your concerns

The commands are more intuitive than Amazon's AMI tools:

  • rudy-ec2 instances -C
  • rudy-ec2 groups -A -p 8080 -a 11.22.33.44 group-name
  • rudy-ec2 volumes -C -s 100
  • rudy-ec2 images
  • ...

All configuration is in a single file (~/.rudy/config).

It can output in several formats (yaml, json, csv, tsv, and of course regular text):

rudy-ec2 -f yaml snapshots
--- 
:awsid: snap-2457b24d
:progress: 100%
:created: "2009-05-08T15:24:17.000Z"
:volid: vol-4ee10427
:status: completed

Regarding the private keys, There are no EC2 tools that allow to create private keys for with a password for booting a public instance because the API doesn't support it. However, if you create your own image, you can use your private keys.

Here's more info:

delano
Thanks for your answer, and for writing Rudy! The next time I need to boot up an instance, I will try out Rudy and Tim Kay's perl based command line tools from the earlier answer (I don't use EC2 that often, I just occasionally boot an OpenSolaris instance or Fedora instance for testing something out that I can't test under Mac OS X and Ubuntu). Thanks also for the answer about creating private keys with a password, though it's rather frustrating, as I can't see any reason why they wouldn't just let you upload your own public key.
Brian Campbell
A: 

I have an open source graphical system admin tool called EC2Dream that replaces the command line tool. It installs on windows, linux and Mac OS clients and is written in Ruby and FXRuby. See www.ec2dream.com.

Neill Turner

www.ec2dream.com