This document assumes that the reader is comfortable working in a Linux environment. In addition, access to an SSH client and an installation of a Java 5 compatible Java Runtime Environment (JRE) is required. For more information, refer to the following sections.
As a convention, all command line text will be
prefixed with . The actual command
line prompt on your machine is likely to be different. We also use
PROMPT> to indicate a Linux specific
command and $ for a Windows
specific command. While we don't currently provide explicit instructions,
the tools also work correctly on Mac OS X (the commands will more resemble the Linux commands provided).
The example output resulting from the command is shown immediately thereafter without any prefix.
C:\>
![]() | Note |
|---|---|
If you are using Cygwin, EC2_HOME, EC2_PRIVATE_KEY, and EC2_CERT must use UNIX paths (JAVA_HOME should have a Windows path.) Also, the value of EC2_HOME cannot contain any spaces, even if the value is quoted or the spaces are escaped. |
For some of the examples illustrated in this guide you'll need access to an SSH client. Most Linux/Unix installations include an SSH client by default. If yours does not, the OpenSSH project provides a free implementation of the full suite of SSH tools. For more information, go to the OpenSSH home page.
Windows users can download and install PuTTY, a free SSH client. To download the client and installation instructions, go to the PuTTY home page. For information on how to use PuTTY with Amazon EC2, see Appendix: PuTTY.
The command line tools used in this guide require Java version 5 or later to run. Either a JRE or JDK installation is acceptable. To view and download JREs for a range of platforms, including Linux and Windows, go to http://java.sun.com/j2se/1.5.0/.
The command line tools depend on an environment variable
(JAVA_HOME) to locate the Java runtime. This
environment variable should be set to the full path of the
directory that contains a sub-directory
named bin which in turn contains
the java (on Linux/Unix) or
the java.exe (on Windows) executable. You
might want to simplify things by adding this directory to your
path before other versions of Java.
Following is an example of how to set this environment variable in Linux or Unix.
$export JAVA_HOME=<PATH>
Following is an example of the syntax in Windows.
C:\>set JAVA_HOME=<PATH>
You can confirm this by running $JAVA_HOME/bin/java -version and
checking the output.
$$JAVA_HOME/bin/java -versionjava version "1.5.0_09" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03) Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode, sharing)
The syntax is different on Windows, but the output is similar.
C:\>%JAVA_HOME%\bin\java -versionjava version "1.5.0_09" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03) Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode, sharing)