|
Resources
Developer Tools
Amazon EC2 API Tools
 |
The API tools serve as the client interface to the Amazon EC2 web service. Use these tools to register and launch instances, manipulate security groups, and more.
|
|
 |
Download
Download the Amazon EC2 API Tools from Amazon S3.
See the related Amazon EC2 technical documentation below for more information on using the command-line tools.
Having problems or questions? Please post to the
EC2 Forum where we will be happy to help.
Note: the API tools do not include the AMI tools. For the AMI tools, which are used for bundling and uploading AMIs, please use the link under Related Documents below.
What's New?
- Support for EC2 API version 2009-11-30: Spot Instances
- Support for EC2 API version 2009-10-31: Boot from EBS
- Support for EC2 API version 2009-08-15: EBS Shared Snapshots
- Support for EC2 API version 2009-07-15: Amazon Virtual Private Cloud
- Support for EC2 API version 2009-05-15: Amazon CloudWatch, Auto Scaling, and Elastic Load Balancing
- Support for EC2 API version 2009-03-01: Reserved Instances
- Addition of the ec2-migrate-image command to migrate images between Amazon EC2 regions
- Support for EC2 API version 2008-12-01: Amazon EC2 in Europe
- Support for EC2 API version 2008-08-08: Amazon EC2 running Windows Server and SQL Server
- Support for EC2 API version 2008-05-05: Amazon Elastic Block Store (EBS)
- The Windows cmd line issue noted below has been corrected
Licence Notice
Copyright 2008 Amazon.com, Inc. or its affiliates. All Rights Reserved. All of the code, software libraries, applications, updates, tools, and other information and materials made available for download from this web page ("Software") are licensed under the Amazon Software License (the "License"). You may not use the Software except in compliance with the License. A copy of the License is located at http://aws.amazon.com/asl/ or in the "license" file accompanying the Software. The Software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
Posts:
242
Registered:
1/28/09
|
|
|
Posts:
2
Registered:
1/27/09
|
|
|
|
Re: Amazon EC2 Command-Line Tools
Posted:
Oct 3, 2009 3:23 PM PDT
in response to: rbradwell
|
|
|
Thanks Cindy! It's much appreciated.
Cheers,
Niran
|
|
Posts:
1
Registered:
11/12/09
|
|
|
|
Re: Amazon EC2 Command-Line Tools
Posted:
Nov 25, 2009 2:04 PM PST
in response to: afajem
|
|
|
ec2 command line tools distribution have errors in the cmd files...
for instance:
if "%CHK_HOME:"=%" == "_" goto HOME_MISSING
and is causing invalid path errors.. the code s/b
if "%CHK_HOME%" == "_" goto HOME_MISSING
Any ideas of when this will be fixed?
Regards
Vince
|
|
Posts:
1
Registered:
7/12/08
|
|
|
|
ec2-run-instances -b option not working on Windows
Posted:
Dec 19, 2009 9:47 PM PST
in response to: rbradwell
|
|
|
Seems to work ok on linux system, however:
ec2-run-instances --key xxx -b /dev/sda1=:100
Returns 'invalid argument for -b option' /dev/sda1
|
|
Posts:
1
Registered:
7/1/08
|
|
|
|
Re: Amazon EC2 Command-Line Tools
Posted:
Jan 26, 2010 1:48 PM PST
in response to: rbradwell
|
|
|
"See the related Amazon EC2 technical documentation below for more information on using the command-line tools."
um, there is no such related link. where's the documentation?
could you consider packing some documentation into the zip with the tools?
|
|
|
|
Syntax problem in Windows .cmd files, Apr 3, 2007 4:41 PM
Reviewer: Ali Sinan Unur
The .cmd files for Windows start with the check:
if "%EC2_HOME:"=%" == "" goto HOME_MISSING
This, I presume, is a typo. The correct check should be
if "%EC2_HOME%" == "" goto HOME_MISSING
In addition, the syntax for calling ec2-cmd.cmd is incorrect as well:
"%EC2_HOME:"=%\bin\ec2-cmd" AuthorizeGroup %*
should be
"%EC2_HOME%\bin\ec2-cmd" AuthorizeGroup %*
The errors are replicated in all files, so I assume this is due to some automated tool being used to generate the .cmd scripts.
Sinan
|
|
Broken on Windows...., Jun 22, 2007 8:44 PM
Reviewer: Carlin Wiegner
Same issue as the previous reviewer. Command line tools broken on Windows...
cw
|
|
error on mac osx, Jun 23, 2007 8:22 AM
Reviewer: cnicules
ciprian$ ./ec2-describe-images -o self -o amazon
Required option '-K/--private-key' missing (-h for usage)
ciprian$ java -version
java version "1.5.0_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-164)
Java HotSpot(TM) Client VM (build 1.5.0_07-87, mixed mode, sharing)
hope that helps
|
|
Windows cmd line errors, Jun 24, 2007 8:09 AM
Reviewer: mattadata
I have the same problem as the first reviewer. Will this be corrected?
|
|
29th of June, Windows Scripts Still Broken, Jun 29, 2007 6:16 AM
Reviewer: ra66i
Same problem as first reviewer.
Maybe it's time this was fixed in the default package?
|
|
Far from perfect, Jul 1, 2007 8:09 PM
Reviewer: someoneonline
Still there...I have a perl program that fixes these issues.
|
|
Doesn't work on Windows, Jul 6, 2007 12:17 AM
Reviewer: Milena Berry
Have my java version definitely outputting, got errors like others worked at it for 2 hours and now have the "the system can not find the specified path" when trying to run any ec2 commands...
|
|
Everything works great, but it's missing important commands, Aug 3, 2007 12:17 PM
Reviewer: Brandon Zylstra
commands like ec2-bundle-vol (and all related commands for bundles) are missing! what's up!?
|
|
Command Line Tools Do Not Work, Sep 18, 2007 11:13 AM
Reviewer: Paul Whitelock
Still seems to be problems with the batch files on Windows. Doesn't anyone at Amazon monitor these comments? It seems like nothing has been done to fix the problem.
|
|
Ubuntu Probleem, Oct 12, 2007 10:05 AM
Reviewer: thijsb
Exception in thread "main" java.lang.NoClassDefFoundError: com/amazon/aes/webservices/client/cmd/
help ?
|
|
STILL BROKEN, Oct 21, 2007 2:59 PM
Reviewer: Benjamin Hill
for the love of all that is holy, will someone please fix these.
|
|
Version, Nov 3, 2007 6:26 AM
Reviewer: Mitch Monmouth
How about some explicit versioning? I had to dig quite far to figure out where this "new" version was so I could start using instance types.
|
|
- - private-key error, Nov 29, 2007 2:38 PM
Reviewer: Steve Allgood
If you try to execute one of the ec2* commands and get the error:
Required option '-K/--private-key' missing (-h for usage)
You haven't set the environment variables EC2_PRIVATE_KEY and EC2_CERT for your X.509 certificate.
Go back to the instructions at “Telling the Tools Who You Are”
I just made the same mistake and had to go back.
~Steve
|
|
Works Very Well, Jan 13, 2008 9:05 PM
Reviewer: wersdfgbh
After the updates these tools are working very well for me on Ubuntu 6.06.
|
|
Where's ec2-bundle-vol?, Jan 14, 2008 8:35 PM
Reviewer: scott10001
The download doesnt seem to have the bundle tools... minus 2 stars for missing 2 tools.
|
|
Doesn't Work in Windows, Jan 17, 2008 11:41 AM
Reviewer: sputnikintegrated
$ ec2-describe-images -o self -o amazon
Exception in thread “main” java.lang.NoClassDefFoundError: and
All environment variables are set. What's the deal?
|
|
what a joke these tools., Feb 2, 2008 1:52 AM
Reviewer: brfsa
Those tools need serious testing... there are a bunch of errors.
I have to hack all day to get my image bundled...
what a shame.
|
|
Works right out of the box, Mar 2, 2008 9:51 PM
Reviewer: Yuri Niyazov
Works on windows right out of the box if the instructions in the tutorial are followed exactly. I have no idea what the rest of the comments above are talking about.
|
|
Works with IcedTea, Mar 9, 2008 9:53 PM
Reviewer: F????liciano Matias
Work with IcedTea provided by Fedora 8.
|
|
Fix for Windows cmds - no spaces in Path or filename, Mar 11, 2008 10:52 AM
Reviewer: Alia Atlas
Following the tutorial and using version 1.2-13740, I also initially encountered
a failure when I tried to run
C:> ec2-describe-images -o self -o amazon
Exception in thread "main" java.lang.NoClassDefFoundError: Files\AWS\ec2-api-tools-1\2-13740\lib\activation-1/1/jar;C:\Program
This looked suspiciously to me like the path for the tools wasn't being correctly
parsed, since I had placed it in "C:\Program Files\AWS\ec2-api-tools-1.2-13740"
I tried moving the tools to C:\ec2\ec2-api-tools-1.2-13740, changing the EC2_HOME
and PATH appropriately to use that new location, and successfully ran the command.
I'm not very impressed, as this is an extremely basic test to run, but clearly
Windows isn't the targeted environment.
|
|
error, Mar 30, 2008 6:46 AM
Reviewer: suprem3
C:\ec2\ec2-api-tools-1.3-19403\bin>ec2-add-group
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/amazon/ae
s/webservices/client/cmd/AddGroup (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
3)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
C:\ec2\ec2-api-tools-1.3-19403\bin>java -version
java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing)
|
|
Source code available, May 4, 2008 4:41 AM
Reviewer: Traveller John
Is the source code for the tools available?
|
|
Missing install / readme, Jul 14, 2008 12:14 PM
Reviewer: waizi
I am missing an install or readme file for the API tools? Where can I find this?
Kind regards, Alfred Waizenauer
|
|
Tools, Resources, Docs, Jul 23, 2008 4:01 PM
Reviewer: G. Howard
If a package is prepared properly, we would not be having conversations about such fundamental items. If all the users were to twitter their AWS activities, and if AWS staff caught wind of it (they would), their brand would be put in quite a bright spotlight.
I find that these types of situations can always be helped with pressure from outside. If the folks in charge of the brand were to understand how important it is to support this product, perhaps the errors would be fixed.
|
|
EC2 on OS X, Oct 6, 2008 1:19 AM
Reviewer: squater747
Getting an image up and running was very straight forward. I didn't experience any issues with using OS X
|
|
Everything's OK on Linux, Oct 11, 2008 9:29 PM
Reviewer: njtom
No troubles getting things working under CentOS 4.4.
|
|
Bad Windows setup instructions, Oct 14, 2008 1:37 PM
Reviewer: omonnig
The setup instructions tell you to use SET from the command line to set environment variables. Unfortunately, this works only for the current instance of the cmd window. You can set the value permanently using either SETX key=value or Control Panel->System->Advanced Tab->Environment Variables button. -1 star
The first example ec2 command line in the setup uses a command that is not available on most Windows systems - grep. You can get a free version from GNU - search "gnu grep". -1 star
Penalty for not hiring a windows literate person to write and test your setup instructions -1 star
I have heard good things about EC2, but these simple mistakes make me wonder.
|
|
Missing Windows Steps, Oct 20, 2008 2:09 PM
Reviewer: Chris C. Westbrook
I would have reviewed these tools different if the instructions dropped the Windows steps half way through. I have both Windows and Linux environments at my workstation, but as per the guide, spent the time to setup Windows as it seemed a support option.
Just like the last review pointed out.
1. Windows does not support the GREP command out of the box
2. The 'path' in windows either needs to use the setx command or provide a config.cmd which has you set each of the PATHS that you need.
3. I didn't test this one 100%, but it did resolve one of the issues I had... Not only the location path of the tools themselves cannot have a " " (space) they also cannot have an _ (underscore)
As this is your introduction into your product and looking for the continued success of the AWS for new customers, I strongly suggest that you dedicated some more time in ironing out your process for new users.
Thank you
Reference:
http://docs.amazonwebservices.com/AWSEC2/latest/GettingStartedGuide/
|
|
Windows command line tools, Oct 24, 2008 6:21 PM
Reviewer: muffy009
I finally gave up trying to get any of the command line tools to work in Windows. I followed the instructions step by step and could not even get the very first command ec2-describe-images to work. I give up. I'm doubly disappointed because the pay as you go option fills a need for small business' such as mine and because the getting started guide for Windows seemed to fairly straightforward and geared for a competent user without a system administrators knowledge.
|
|
Still Has Issues, Jan 7, 2009 8:41 PM
Reviewer: g1en
Seeing as this is one of the first things a new AWS user is likely to use, it would be nice if it was easier to use! Following the "Getting Started Guide" closely, I still spent a long time trying to get this to work. I found that the paths cannot contain spaces or quotes - if they do, there is an unhelpful Java usage description printed out. It would be nice if we were at least warned about this somewhere. Don't you just love batch files.
|
|
Windows scripts STILL broken, Feb 6, 2009 2:15 PM
Reviewer: mrm123
The CMD files still have the bug the first reviewer noted almost two years ago.
In ec2-describe-instances.cmd:
if "%CHK_HOME:"=%" == "_" goto HOME_MISSING
"%EC2_HOME:"=%\bin\ec2-cmd" DescribeInstances %*
|
|
Works well on XP, Feb 7, 2009 6:41 PM
Reviewer: Donald 'Donnie' Demuth
I was able to use the EC2 Tools and get my instance up and running within a quarter of an hour. I was expected more difficulties considering that I myself am not much of a sysadmin guy. However, I flew through the tutorial and I am just shocked at how easy that was.
Works great guys. I can't wait to play around.
|
|
Doesn't work, Mar 9, 2009 2:23 AM
Reviewer: moonmoth
I'd say I was a pretty experienced IT guy. At least I have a lot of experience in setting environment variables, Paths etc but I couldn't get the tools working on a Vista machine despite following the guide to the letter.
Luckily Amazon have a web based gui which is in Beta at the moment. Find it here:
https://console.aws.amazon.com/index
When you think about it - using a set if command line tools to control a web based product seems a bit 1979 not 2009.
|
|
Use the $PATH, Luke, Mar 18, 2009 12:50 PM
Reviewer: M. Coleman
For some reason, these commands want to run 'java' as $JAVA_HOME/bin/java. This is un-Unixy (and therefore bad :-).
Just use the 'java' in $PATH--that's what it's there for.
|
|
they work fine, Oct 31, 2009 7:56 AM
Reviewer: EA Poe
the tools are fine
do yourself a favor and, if you are on windows, run the tools in a virtual machine running linux, this will be much cleaner than any other approach
|
|
|
|
 |
|
|