Warning: This document describes an old release. Check here for the current version.

EC2 Client Notes

This section explains how to use 3rd-party EC2 clients with the Nimbus EC2 frontends, both SOAP and Query.

Using the EC2 SOAP frontend from the console (#)

When using a cloud running the EC2 frontend, you can download this EC2 client from Amazon or try a number of different client that are out there.

NOTE: Amazon EC2 upgrades happen without warning and so there is sometimes a sync error between their default tools and the tools needed to work with particular Nimbus elastic services.

With the client from Amazon, you need to adjust the following environment variables (using other clients, the configurations can vary).

  • EC2_HOME - Set the base directory (such that $EC2_HOME/bin is valid)
  • EC2_URL - Set the service endpoint to the Nimbus based service
  • EC2_CERT - Set the public credential to your public .pem based cert
  • EC2_PRIVATE_KEY - Set the private credential to an unencrypted .pem based key


$ export EC2_HOME=`pwd`
$ export EC2_URL=https://HOST:PORT/wsrf/services/ElasticNimbusService
$ export EC2_CERT=/tmp/ec2clientcert.pem
$ export EC2_PRIVATE_KEY=/tmp/ec2clientkey.pem

The URL for EC2_URL will be provided to you by an administrator or some documentation (HOST:PORT in the example is a placeholder for an actual hostname and port number)

For example, see the Nimbus cloud docs for running EC2 clients.

If you have a problem, consult the troubleshooting guide.

Before being able to launch an instance, you will need to register a keypair like so:

  • $ MYPUBKEY=`cat .ssh/id_rsa.pub`
  • Check to make sure those contents look OK:

    $ echo $MYPUBKEY
  • Send the public key value to the service, labelling it "mykey"

    $ ec2-add-keypair "mykey||$MYPUBKEY"

List the available images in your personal directory:

$ ec2-describe-images

Pick one, for example "hello-cloud". And with the "-k" argument, use the ssh key label you used above to register an ssh public key.

$ ec2-run-instances -k mykey hello-cloud

Check status:

$ ec2-describe-instances

After seeing 'pending' change to 'running', log in at the address printed:

$ ssh root@abc.def.com

Terminate using the "instance ID" printed when you first launched (and also available from ec2-describe-instances). It looks like "i-4662834e":

$ ec2-terminate-instances i-4662834e

Using the EC2 Query frontend from Python with Boto (#)

Nimbus 2.4 has experimental support for the EC2 Query interface, which is used by the excellent Python client, boto. In order to use this interface, you must have Query credentials from the cloud administrator. These are composed of an access identifier (usually the hash of your DN) and a shared secret key.

You also need the URL of the Query interface on the Nimbus service node. See the University of Chicago cloud for example.

import boto

# first create a connection to the appropriate host, using your credentials
conn.host = "service.hostname.com"

# then do something with the connection

Please refer to the boto documentation for more details on usage.