Amazon Elastic Compute Cloud

Amazon EC2 AMI Tools

Click for a printer friendly version of this document Printer Friendly Save to del.icio.us
Average Review:

The Amazon EC2 AMI Tools are command-line utilities to help bundle an Amazon Machine Image (AMI), create an AMI from an existing machine or installed volume, and upload a bundled AMI to Amazon S3.

Submitted By: Dave@AWS  

Download the Amazon EC2 AMI Tools from Amazon S3:

Note: Some browsers associate the .rpm extension with Real Player software, causing the software to open this RedHat Package Manager file. If you encounter this issue, you can either change your browser's file associations, or right-click the link, then save the link target to your computer.

What's New?

  • Support for EC2 API version 2009-10-31: Amazon EC2 in the Northern California Region (us-west-1)
  • 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-02-01
  • AMI Tools packaged as a ZIP file in addition to the RPM.
  • Improved fstab handling: The existing fstab is now bundled into the AMI unless otherwise specified
  • Better Ubuntu support: bash is explicitly called where required. This fixes "bad substitution" errors.

Questions/Issues?

Please post a message to the EC2 Forum, where we'll be happy to assist.

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.


Related Documents
Type: Release Notes Release: Amazon EC2 on 2008-12-10
Type: Technical Documentation Docs: Amazon EC2 (API Version 2008-12-01)
Type: Articles & Tutorials Feature Guide: Amazon EC2 Regions
Type: Developer Tools Amazon EC2 API Tools
Type: Articles & Tutorials Cleaning up EC2 Images, AMIs, and Instances

Discussion

The 5 most recent discussion messages. View full discussion.

martynttaylor
Posts: 4
Registered: 4/18/08
Re: automation of Amazon EC2 AMI Tools????
Posted: Apr 23, 2008 6:03 AM PDT   in response to: choosepiadmin
 
  Click to reply to this thread Reply

Hi,

Unfortunately Im not sure on any scripts to automate this for you.  There are some websites that give you a graphical interface to some of the tools such as uploading and downloading etc...

try:  www.rightscale.com

If your trying to create an AMI from an Image such as Xen Image.  Then there are a few things you need to do before you run the ec2-bundle-image tool.

Check out:

http://jimmyg.org/2007/09/01/custom-debian-ec2-amis-from-xen-images/

This is a good guide that I used.

Once you run the ec2-bundle-image tool you will get an AMI output usually to tmp folder.  All you do then is use ec2-upload... tool and give it the manifest output by ec2-bundle-image tool and it will upload for you.

Next time post in the EC2 Forum you will most likely get a quick response.

Hope this helps

Cheers

Martyn







Eric Hammond
RealName(TM)

Posts: 1,180
Registered: 7/7/07
Re: automation of Amazon EC2 AMI Tools????
Posted: Jun 10, 2008 2:45 PM PDT   in response to: choosepiadmin
 
  Click to reply to this thread Reply

Note: "level22" is my old bucket name which contains outdated Ubuntu AMIs.  I am now placing the Ubuntu AMIs in the "alestic" and "alestic-64" buckets.  You can always find the latest Ubuntu AMIs on http://alestic.com with links to the public AMI documents on Amazon.  There is a support group for using Ubuntu on EC2 here: http://ec2ubuntu-group.notlong.com

There are a couple ways to do what you want.  The first, and most relevant to this page, is to use the ec2-bundle-vol and ec2-upload-bundle commands in the AMI tools.  These are used on a running instance.  I've listed samples of how I run these commands on Ubuntu here: http://groups.google.com/group/ec2ubuntu/msg/422f8c1b709390de

You might also consider creating an Ubuntu AMI from scratch with your customizations.  This is a bit more work, but I've put instructions on how to use an automated script to do this on http://alestic.com and you can ask the ec2ubuntu community above for assistance if you run into roadblocks.

--
Eric Hammond
http://www.anvilon.com



sp6ym7
Posts: 1
Registered: 6/18/08
Re: automation of Amazon EC2 AMI Tools????
Posted: Jun 18, 2008 6:28 PM PDT   in response to: Eric Hammond
 
  Click to reply to this thread Reply

Forgive me to ask such question:

I succeeded in uploading and booting an Ubuntu image but fail to access it even I used  keypair for ssh.

The problem, I think, is the server I created image from is already a running server with its IP address inside. So when I bundle it and copy it to EC2, EC2 will give it an address. How could it be possible to access the image when its IP and the IP EC assigned doesn't match? This think I haven't understood yet.

Can someone tell me how? I do need to move some Ubuntu (in service) to EC2.

Thanks


Eric Hammond
RealName(TM)

Posts: 1,180
Registered: 7/7/07
Re: automation of Amazon EC2 AMI Tools????
Posted: Jun 18, 2008 7:09 PM PDT   in response to: sp6ym7
 
  Click to reply to this thread Reply

sp6ym7,

Are you starting with one of the Ubuntu AMIs listed on http://alestic.com ?

If so, are you rebundling with the Amazon EC2 AMI command line tools which come pre-installed on that AMI or are you trying to install your own?

The Ubuntu AMIs listed on http://alestic.com have the AMI tools patched to avoid problems with networking (mac address).  If you install your own copies from Amazon you will run into problems.

If you still have problems, I recommend you start a new question thread and in it describe in detail exactly how you built the image, how you run it, and how you try to connect to it. There are a dozen common problems which can result in similar symptoms, so the more information, the better.



eastagile
Posts: 1
Registered: 7/20/10
Re: automation of Amazon EC2 AMI Tools????
Posted: Jul 20, 2010 7:52 PM PDT   in response to: Eric Hammond
 
  Click to reply to this thread Reply

Is there a way to clone my AMI (which existing on the cloud) directly to the S3 storage? I have struggled for many days but couldn't find any guide on that.



Reviews
Create Review Write a Review

Why Linux only?, Mar 14, 2007 11:32 AM
Reviewer: denis bider
Why Linux only? :-(

Linux for the win, Mar 27, 2007 2:25 AM
Reviewer: synchronize
why would you want windows, then you will need to register each instance, not to mention how are you supposed to install without a monitor. not to mention every time automatic updates occur it restarts... LOL!!! i'm currently imagining whats gonna happen when windows decides to go to sleep for no reason...

does not work with ubuntu?, Apr 4, 2007 6:00 AM
Reviewer: amitupadhyay
I get a "sh: Syntax error: Bad substitution" error when I use it from an ubunutu instance.

Instructions for use with Ubuntu, May 9, 2007 12:58 AM
Reviewer: silicondust
Pulling the information from the support forums into one place for how to install the EC2 AMI tools on a Ubuntu image. Tested with Ubuntu Feisty created using debootstrap. (All credit belongs to the guys on the support forums, most notably Chris@AWS) apt-get install wget alien ruby libopenssl-ruby1.8 rsync curl wget alien -i ec2-ami-tools.noarch.rpm ln -sf /bin/bash /bin/sh ln -s /usr/lib/site_ruby/aes /usr/local/lib/site_ruby/1.8/i486-linux/aes Edit: /usr/lib/site_ruby/aes/amiutil/image.rb Change: exec( 'for i in console null zero ; do /sbin/MAKEDEV -d ' + dev_dir + ' -x $i ; done' ) To: exec("cd #{dev_dir} && /sbin/MAKEDEV console && /sbin/MAKEDEV std && /sbin/MAKEDEV generic") If the kernel modules have not already been installed then copy them to /lib/modules and "modprobe loop" ec2-bundle-vol and ec2-upload-bundle should now work. Nick

Works awesome, Sep 11, 2007 10:35 PM
Reviewer: scockroach
Everything works awesome. Good work!

widely supported package, Sep 28, 2007 5:08 AM
Reviewer: cyril
it would be great anyway to have the tools distributed also (or only) in a non rpm format, eventually with some manual configuration steps, but more easily portable on different distributions

ec2-delete-bundle is broken, Oct 20, 2007 10:50 PM
Reviewer: wkessler
WHen i try to delete my bundle (created by going through the Getting Started steps) on S3 from a running instance or from my own server (ubuntu) I get: /usr/lib/site_ruby/aes/amiutil/deletebundle.rb:4:in `require': no such file to load -- aes/amiutil/S3 (LoadError) from /usr/lib/site_ruby/aes/amiutil/deletebundle.rb:4 How do I delete the AMI file I created?!?

same error here, Nov 13, 2007 2:32 PM
Reviewer: s_sati11
I get this error when I tried to delete an AMI image from one of the Amazon stock debian image AMI instances. Pls. help. /usr/lib/site_ruby/aes/amiutil/deletebundle.rb:4:in `require': no such file to load -- aes/amiutil/S3 (LoadError) from /usr/lib/site_ruby/aes/amiutil/deletebundle.rb:4

debian ami-8db95ce4, Jan 24, 2008 6:17 PM
Reviewer: borisreitman
On debian I had to install kernel modules and to modprobe loop. It has the old depmod, so one needs to upgrade. 1. load the loop device download kernel modules here: http://s3.amazonaws.com/ec2-downloads/modules-2.6.16-ec2.tgz tar xzvf modules-2.6.16-ec2.tgz -C / apt-get install module-init-tools depmod -a modprobe loop 2. get the tools apt-get install ruby libopenssl-ruby openssl rsync curl i tried the zip version, seems fine (no need for alien stuff). 3. run ec2-bundle-vol command with all the options

ec2-unbundle, Feb 21, 2008 2:52 PM
Reviewer: Kapil Srivastava
Where to get this?

No Windows?, Jun 15, 2008 11:19 AM
Reviewer: Eugene
A year has passed and still no Windows?

Windows..., Aug 17, 2008 3:55 AM
Reviewer: Dmitriy Kazimirov
Looks like not all EC2 host hardware supports VT/Pacifica (or Amazon just couldn't come to agreement with MS about licensing of such beast) Anyway, you have windows -:) search for 'Windows' on public AMIs(but it will use QEmu -:)

Works perfectly if you follow the Starting Guide Instructions, Aug 28, 2009 12:11 PM
Reviewer: dlobabo
I'm surprised the average reviews are so low. As long as you follow the Starting Guide instructions exactly you are good to go.
Welcome, Guest Help
Login Login