Amazon EC2 API Tools

Developer Tools>Amazon EC2 API Tools
Community Contributed Software

  • Amazon Web Services provides links to these packages as a convenience for our customers, but software not authored by an "@AWS" account has not been reviewed or screened by AWS.
  • Please review this software to ensure it meets your needs before using it.

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.


Submitted By: David@AWS
AWS Products Used: Amazon EC2
Languages(s): Other
License: Other
Created On: August 23, 2006 9:00 PM GMT
Last Updated: April 7, 2014 4:08 PM GMT


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 2014-02-01: Updated to support VPC peering within a region.
  • Support for EC2 API version 2013-02-01: Updated to support the new AMI Copy feature and the new DNS Hostnames in VPC feature.
  • Support for EC2 API version 2012-12-01: Updated to support the new EBS Snapshot Copy feature, which enables you to copy EBS snapshots across AWS regions.
  • Support for EC2 API version 2012-08-15: Updated to support a new Reserved Instance Marketplace and support for IPsec VPN connections to Amazon VPC using static routing configuration and automatic propagation of routes from your VPN and Direct Connect links to your VPC routing tables.
  • Support for EC2 API version 2012-07-20: Updated to support new Amazon Elastic Block Store (EBS) volume type: Provisioned IOPS (input/output operations per second) and the ability to launch selected Amazon EC2 instance types as EBS-Optimized instances.
  • Support for EC2 API version 2012-06-15: Updated to include support for multiple IP addresses in Amazon VPC.
  • Support for EC2 API version 2012-05-01: Updated to include support for EC2 VM Export.
  • Support for EC2 API version 2012-04-01: Updated to include support for AWS Marketplace.
  • Support for EC2 API version 2012-03-01: Updated to include support for Volume Status.
  • Support for EC2 API version 2011-12-15: Updated to include support for Instance Status Checks.
  • Support for EC2 API version 2011-12-01: Updated to include support for Elastic Network Interfaces.
  • Support for EC2 API version 2011-11-01: Updated to include support for New Reserved Instance Offerings.
  • Support for EC2 API version 2011-11-01: Instance Status
  • Support for EC2 API version 2011-07-15: VM Import Support for Windows 2003 and VHD file format, and support for monitoring VPN telemetry.
  • Support for EC2 API version 2011-05-15: Support for Amazon Spot Instances Availability Zone Local Pricing Changes
  • Support for EC2 API version 2011-02-28: Dedicated Instances
  • Support for EC2 API version 2011-01-01: VPC IA
  • Support for EC2 API version 2010-11-15: VM Import
  • Support for EC2 API version 2010-08-31: Tagging, Filtering, Import Key Pair, and Idempotency.
  • Support for EC2 API version 2010-06-15: Cluster Compute Instances
  • 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

Related Documents

Licence Notice

Copyright 2008, 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 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.


install instructions
Install Instructions in the readme.txt included in the download would be helpful. Perhaps a install.txt with instructions for linux, windows, and Mac OS X By The Way, I found these for Mac OS X
intelikvest on August 16, 2010 12:16 PM GMT
What's the deal
I see frequent mention of a tutorial. None was included in the downloaded Zip. Also I see no mention of a tutorial in the related documents or in the visible comments. Where do we read about how to use this?
David Dean on August 4, 2010 10:20 PM GMT
they work fine
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
EA Poe on October 31, 2009 2:56 PM GMT
Use the $PATH, Luke
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.
M. Coleman on March 18, 2009 7:50 PM GMT
Doesn't work
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: When you think about it - using a set if command line tools to control a web based product seems a bit 1979 not 2009.
moonmoth on March 9, 2009 9:23 AM GMT
Works well on XP
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.
Donald 'Donnie' Demuth on February 8, 2009 2:41 AM GMT
Windows scripts STILL broken
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 %*
mrm123 on February 6, 2009 10:15 PM GMT
Still Has Issues
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.
g1en on January 8, 2009 4:41 AM GMT
Windows command line tools
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.
muffy009 on October 25, 2008 1:21 AM GMT
Missing Windows Steps
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:
Chris C. Westbrook on October 20, 2008 9:09 PM GMT
Bad Windows setup instructions
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.
omonnig on October 14, 2008 8:37 PM GMT
Everything's OK on Linux
No troubles getting things working under CentOS 4.4.
njtom on October 12, 2008 4:29 AM GMT
EC2 on OS X
Getting an image up and running was very straight forward. I didn't experience any issues with using OS X
squater747 on October 6, 2008 8:19 AM GMT
Tools, Resources, Docs
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.
G. Howard on July 23, 2008 11:01 PM GMT
Missing install / readme
I am missing an install or readme file for the API tools? Where can I find this? Kind regards, Alfred Waizenauer
waizi on July 14, 2008 7:14 PM GMT
Source code available
Is the source code for the tools available?
Traveller John on May 4, 2008 11:41 AM GMT
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( at 3) at at$100( at$ at Method) at at java.lang.ClassLoader.loadClass( at sun.misc.Launcher$AppClassLoader.loadClass( at java.lang.ClassLoader.loadClass( at java.lang.ClassLoader.loadClassInternal( 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)
suprem3 on March 30, 2008 1:46 PM GMT
- - private-key error
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
Steve Allgood on March 27, 2008 6:32 AM GMT
Fix for Windows cmds - no spaces in Path or filename
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.
Alia Atlas on March 11, 2008 5:52 PM GMT
Works with IcedTea
Work with IcedTea provided by Fedora 8.
F????liciano Matias on March 10, 2008 4:53 AM GMT
Works right out of the box
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.
Yuri Niyazov on March 3, 2008 5:51 AM GMT
what a joke these tools.
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.
brfsa on February 2, 2008 9:52 AM GMT
Doesn't Work in Windows
$ ec2-describe-images -o self -o amazon Exception in thread "main" java.lang.NoClassDefFoundError: and All environment variables are set. What's the deal?
sputnikintegrated on January 17, 2008 7:41 PM GMT
Where's ec2-bundle-vol?
The download doesnt seem to have the bundle tools... minus 2 stars for missing 2 tools.
scott10001 on January 15, 2008 4:35 AM GMT
Works Very Well
After the updates these tools are working very well for me on Ubuntu 6.06.
wersdfgbh on January 14, 2008 5:05 AM GMT
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.
Mitch Monmouth on November 3, 2007 1:26 PM GMT
for the love of all that is holy, will someone please fix these.
Benjamin Hill on October 21, 2007 9:59 PM GMT
Ubuntu Probleem
Exception in thread "main" java.lang.NoClassDefFoundError: com/amazon/aes/webservices/client/cmd/ help ?
thijsb on October 12, 2007 5:05 PM GMT
Command Line Tools Do Not Work
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.
Paul Whitelock on September 18, 2007 6:13 PM GMT
Everything works great, but it's missing important commands
commands like ec2-bundle-vol (and all related commands for bundles) are missing! what's up!?
Brandon Zylstra on August 3, 2007 7:17 PM GMT
Doesn't work on Windows
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...
Milena Berry on July 6, 2007 7:17 AM GMT
Far from perfect
Still there...I have a perl program that fixes these issues.
someoneonline on July 2, 2007 3:09 AM GMT
29th of June, Windows Scripts Still Broken
Same problem as first reviewer. Maybe it's time this was fixed in the default package?
ra66i on June 29, 2007 1:16 PM GMT
Windows cmd line errors
I have the same problem as the first reviewer. Will this be corrected?
mattadata on June 24, 2007 3:09 PM GMT
error on mac osx
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
cnicules on June 23, 2007 3:22 PM GMT
Broken on Windows....
Same issue as the previous reviewer. Command line tools broken on Windows... cw
Carlin Wiegner on June 23, 2007 3:44 AM GMT
Syntax problem in Windows .cmd files
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
Ali Sinan Unur on April 3, 2007 11:41 PM GMT
We are temporarily not accepting new comments.
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.