Create an AMI from Scratch

Creating an AMI from scratch will give you the most control over exactly what the image will contain and how it will run. This process takes more effort than specializing an existing AMI, but you have the advantage of knowing exactly what the image contains.

The process for creating a new image requires access to a Linux system, on which you will create your image volume. Ideally, the system on which you create the AMI should have the same Linux distribution as you will use for the image; this will make the process much easier.

The AMI itself will be stored as a single file on the underlying system. This single file will be mounted, using the loop-back file mechanism, to look like a separate partition on your underlying system; once it is mounted, you can create the image’s filesystem using standard Linux tools.

In this section we will guide you through the process of creating an AMI based on the Fedora 7 Linux distribution. The instructions are written with the assumption that the underlying Linux system is also Fedora version 7. We chose Fedora because it is known to be compatible with EC2, and many of the instructional guides available concerning EC2 instances use this distribution, so it should not be difficult to find help if you need it. Version 7 was the latest version of Fedora available when this book was written.

Before you proceed, please ensure that the Fedora system on which you will create your AMI meets the following requirements:

  • The yum ...

Get Programming Amazon Web Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.