Amazon Elastic Compute Cloud
User Guide (API Version 2012-04-01)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

Creating an Image from a Running Instance

This section walks you through creating an Amazon EBS-backed AMI from a running Amazon EBS-backed instance. If you don't have a running instance that uses an Amazon EBS volume for the root device, you must start one up (for instructions, see Launching, Stopping, and Starting).

If you want to customize the instance, go ahead so you can later validate that the AMI you create from the instance is actually different from the original AMI you used to launch the instance. For example, you can add another volume to the instance first, or modify the root volume.

[Tip]Tip

As part of the process of creating your new AMI, we power down the instance and then reboot it. If you prefer the instance not be rebooted, you can use the Amazon EC2 command line tools to create the image instead of the AWS Management Console. The ec2-create-image command has a --no-reboot option. When you use the option, the file system integrity on the created image can't be guaranteed. For more information, go to ec2-create-image in the Amazon Elastic Compute Cloud Command Line Reference.

To create an AMI from a running Amazon EBS-backed instance

  1. On the Instances page, right-click your running instance and select Create Image (EBS AMI).

    [Tip]Tip

    If you don't see this option in the menu, your instance isn't an Amazon EBS-backed instance. For instructions on starting one, see Launching, Stopping, and Starting.

    The Create Image dialog box opens.

  2. Fill in a unique image name and an optional description of the image (up to 255 characters), and click Create This Image.

    [Tip]Tip

    If you're familiar with Amazon EC2 instance store-backed AMIs, the image name replaces the manifest name (e.g., s3_bucket/something_of_your_choice.manifest.xml), which uniquely identifies each Amazon EC2 instance store-backed AMI.

    Create a new image

    Amazon EC2 powers down the instance, takes images of any volumes that were attached, creates and registers the AMI, and then reboots the instance.

    [Note]Note

    You cannot register an image where a secondary (non-root) snapshot has AWS Marketplace product codes.

  3. Go to the AMIs page and view the AMI's status. While the new AMI is being created, its status is pending.

    AMI status pending during creation

    It takes a few minutes for the whole process to finish.

  4. Once your new AMI's status is available, go to the Snapshots page and view the new snapshot that was created for the new AMI. Any instance you launch from the new AMI uses this snapshot for its root device volume.

    New AMI snapshot
  5. Go back to the AMIs page, right-click the image, and select Launch Instance.

    The launch wizard opens.

  6. Walk through the wizard to launch an instance of your new AMI.

  7. Once your instance's status is running, connect to the instance and verify that any changes you made to the original AMI have persisted.

You now have a new AMI and snapshot that you just created. Both will continue to incur charges to your account until you stop or delete them.

To delete an AMI and a snapshot

  1. Go to the AMIs page, right-click the AMI, and select De-register Image.

    The image is de-registered, which means it is deleted and can no longer be launched.

  2. Go to the Snapshots page, right-click the snapshot, and select Delete Snapshot.

    The snapshot is deleted.