Create an Amazon Machine Image

Building an AMI is essentially a way for you to backup and share the Amazon EC2 Instance that you've created. It is also useful for creating a fall-back point if an installation or process goes awry, and you'd like to revert to a previous state.

Prepare to Bundle

  1. You'll need to locate a few things:
    1. The private key that identifies your Amazon Web Services account. This is a .pem file.
    2. The public key that identifies your Amazon Web Services account. This is also a .pem file.
    3. Your Amazon Web Services Account number.
    4. Your Amazon Web Services Password and Super-Secret Password.
  2. Put the two .pem files somewhere accessible from your instance. However, you want to put them in a place that will not get bundled into the image itself. The /mnt directory is a great place. You could also put the files into your Elastic Block Store if you've built one.
Bundle the Image
  1. The image I used to spin up the Instance in the first place came with the Amazon Web Services Tools already installed. Otherwise these would have to be installed on the Virtual Machine.
  2. Bundling the instance uses the command ec2-bundle-vol. For more details on the command, you can type ec2-bundle-vol --help. Here is the command line that you'll use to execute the bundling
    1. ec2-bundle-vol -d <location to put image> -k <path to private key .pem> -c <path to public key .pem> -u <AWS Account Number> -r i386 -p <image name> -s 9000
  3. Next you'll need to upload the image to Amazon's place for these things...
    1. ec2-upload-bundle -b <image name> -m <path to .xml manifest> -a <Access Key ID> -s <Secret Access Key ID>
    2. Note: The manifest should be located in the <location to put image> that you specified in the previous step.
  4. Finally, log in to the EC2 Web Console and use the "Register New AMI" button in the AMIs page. The path to your manifest should be <image name>/<image name>.manifest.xml.
Remaining Issues
  1. This process created a Private Image. I don't know how to create a public one.
  2. There seems to be a little bit of lag-time after you register the image. During this time you may see the following issues:
    1. The resulting Image does not show up as "Owned By Me" in the EC2 Web Console.
    2. The metadata in the manifest seems pretty incomplete.
    3. When trying to Launch an Instance from the Image, it does not allow the launch of a small instance.

Related Community Groups
CSW Debug Blog | 17 Posts | Join
A group blog to discuss metadata Catalog Service for the Web (CSW) implementation experiences
Building a GeoSciML WFS Server | 11 Posts | Join
Development, testing and implementation of a WFS service that returns GeoSciML documents
ETL Debug Blog | 12 Posts | Join
A group blog on implementing and debugging Extract-Transform-Load (ETL) efforts.
Presentations and Posters | 12 Posts | Join
Post your posters and presentations related to USGIN topics.
Metadata interest group | 13 Posts | Join
group for general posting on metadata content, standards, tools
USGIN Amazon Virtual Server Development | 18 Posts | Invite only
Documenting the process of development of a Web Server in the Amazon EC2 environment. Software installations tailored to the requirements for USGIN
GeoNetwork configuration and development | 7 Posts | Join
Discussion on GeoNetwork setup, configuration, and development.
Student Projects | 0 Posts | Join
Discussion of student projects related to USGIN
Drupal Development | 6 Posts | Join
All about bending Drupal to your needs
Geoportal on an Amazon Virtual Machine | 3 Posts | Closed
Installation, configuration, etc.
Using Django for USGIN | 7 Posts | Request membership
Thought and ideas about using Django to accomplish USGIN-related... things.
ArcGIS Server and OGC Services | 3 Posts | Join
Tips on using ArcGIS Server to provide OGC web services
Content model discussion | 0 Posts | Request membership
Community site for comments on development of content models and encoding for information intechange
Making Web Maps | 2 Posts | Request membership
For information about the myriad of mechanisms for showing service data on a web page.
Troubleshooting Web Service Deployment - Blog | 5 Posts | Join
This blog is for documenting our group's experiences with web service deployment.
Best Practices for USGIN Web Service Hosting | 10 Posts | Join
Tips, techniques, and frequently asked questions for hosting AASG Geothermal Data Web Map Services and Web Feature Services
Hub Disaster Recovery | 0 Posts | Request membership
Discussions around how to harden a distributed federated system against disaster; setting up a system to mirror hub VMs at other hubs.