Main Page
 The gatekeeper of reality is
 quantified imagination.

Stay notified when site changes by adding your email address:

Your Email:

Bookmark and Share
Email Notification
Project Snapshot
The purpose of this project is to show how to create an AMI image (used to create EC2 Instances) with EBS from a snapshot of an existing EC2 Instance and then use the new AMI image to create a "clone" or replica instance of the existing EC2 Instance. Unlike the previous tutorial on changing the instance type of an existing EC2 instance that requires stopping it, if you already have a snapshot of the running EC2 instance (the /dev/sda1 volume / root device) you can create a new AMI image and from that an EC2 Instance. This would provide the flexibility of not having to take down the running EC2 Instance and would also provide you with the flexibility of having an AMI (provided you do not already have one). Snapshots can be performed manually, automatically via a cron job in the running EC2 Instance, or perhaps the best low-maintenance method of being done automatically via a SAAS (such as with Skeddly and a few others) where you don't have to write or maintain script.

  1. Before you begin, you'll need to determine the snapshot ID of the /dev/sda1. If additional device(s), or volume(s), are attached you will need to get the snapshot ID(s) of those as well such as /dev/sdf.
  2. Deriving the snapshot ID is achieved by matching the volume ID. If you use an automated snapshot system, hopefully snapshots are intuitively named or has good descriptions.
  3. You will also need to note the kernel ID of the EC2 Instance.

  1. Once you have located the snapshot of the /dev/sda1, select it and click "Create Image".

  1. Next enter an good name for your AMI Image along with a description. It should be clear enough that if you didn't look at it for a year, you would know what it was for without making those awesome "guesses".
  2. Select the architecture and kernel ID along with the snapshot representing the root volume (the /dev/sda1).
  3. Some other options will vary depending on what you have setup, but the "Delete on Termination" should only be checked if you want to have the AMI deleted when it is terminated.

  1. After the AMI Image is created (may take a few minutes), you should be able to select it and click "Launch".
  2. At "Launch" you will select a variety of parameters that will control how the new EC2 Instance is created.

  1. What is important to note here (since we're using EBS) is that the column "Instance Storage" does not apply.

  1. Usually, unless you've setup a custom VPC, you'll select "Launch into EC2-Classic". This option, while convenient, has some big drawbacks such as: (1) if you stop and restart the new EC2 Instance, it will be assigned a new internal IP address which may cause extra work for you, (2) if you have an elastic IP assigned to the new EC2 instance and you perform an activity like changing the instance type, the association of the elastic IP to the new EC2 instance will be dropped (again, more possible work to put back into place).

  1. Under "Add Storage", if you had additional devices associated to the EC2 Instance (and you have them snap-shotted), you can select those snapshots here. If you don't, that makes it even easier.

  1. Here's a chance to enter an intuitive name for the EC2 Instance (that you'll see in the Instances section of the Amazon AWS control panel). The name may be a domain name or someting else short and easily identifiable.

  1. Since you're basing the new EC2 Instance off of one that already exists, you may elect to "Create as new" (or "clone") the security group and then tweak it as may be needed.
  2. If you create a new security group, consider limiting the SSH (port 22) to your IP address. By default, SSH, HTTP, HTTPS are setup to be accessible to everyone.

  1. Lastly, specify the key-pair that will enable to you connect to your fresh new EC2 Instance. As you can see here, you can create one or select an existing key-pair you have already created.
  2. It may not be a good idea to proceed to creating the new EC2 Instance with no key-pair.

About Joe