| Did this page help you? Yes No Tell us about it... |
The process for creating an instance store-backed AMI is different from the process of creating an Amazon EBS-backed AMI. All Amazon EC2 instance store-backed AMIs are loaded from Amazon S3 storage. When you create the AMI, you must upload it to an existing account on Amazon S3. Amazon S3 stores data objects in buckets, which are similar in concept to directories. Buckets have globally unique names and are owned by unique AWS accounts. We refer to this process of creating an AMI as Bundling.
![]() | Caution |
|---|---|
Instance store drives (e.g., the D: drive) are not included in the bundled AMI. Instance store drives and their data are deleted when the instance is terminated. You must store any data that you want to use with the new AMI on the root drive or an Amazon EBS volume. For more information about Amazon EC2 storage options, go to Using Storage. |
You cannot launch the new AMI until the bundling is complete and you have registered the bundled image.
The bundling process can take time and you can monitor the task by using the
ec2-describe-bundle-tasks command. While bundling is in progress, the
task moves through a succession of states, including "waiting-for-shutdown," "storing," and
"complete" states. The output during the process looks like this:
BUNDLE bun-1509ed7c i-cb2a81a0 myawsbucket myimage 2010-03-19T08:22:48+0000 2010-03-19T08:23:50+0000 bundling 12%
When bundling is complete, the status changes to "complete."
You must register your bundled image with Amazon EC2, so Amazon EC2 can locate it and run instances based on it. You don't have to register the bundled image immediately after the bundle task completes. You can still register the bundled image even if the bundle task no longer appears in your list of completed bundle tasks (each task remains on the list for only a limited time).
![]() | Note |
|---|---|
If you make any changes to the source image stored in Amazon S3, you must reregister the image. |
The following diagram shows the general tasks in creating Amazon EC2 instance store-backed Windows AMIs.

Tasks for Creating an Instance Store-Backed Windows AMI
Start by launching a Windows instance that is similar to the AMI you want to create and connect to the instance. For information on connecting to a Amazon EC2 Windows instance, go to Connecting to Windows Instances.
When you are connected to your instance, customize it as you want. For example, you could attach Amazon EBS volumes, or load applications or data on to the instance.
![]() | Important |
|---|---|
It is very important to remember the following behavior of the instance store-backed AMI creation process on the storage drives:
|
When an instance is launched for the first time, it goes through a cycle of
configuration and Sysprep. After the instance boots, some of the
configuration settings are either Enabled or
Disabled to persist the settings through instance reboots.
Before bundling an instance, you can configure the instance using the
EC2Config Service. Use EC2Config Services tool or
EC2Config XML files to change the configuration
settings for your new AMI. For more information, see Using EC2Config Service. For more information about Sysprep, see Sysprep Technical
Reference.
Bundle and then register the AMI.
After you've prepared your instance, the bundling process performs the following tasks, which are listed in the order that they usually take place:
Excludes any instance store drives (i.e., the D: drive on your instance is not included in the bundled AMI)
Compresses the image to minimize bandwidth usage and storage requirements
Encrypts and signs the compressed image to ensure confidentiality and authenticates the image against its creator
Splits the encrypted image into manageable parts for upload
Runs Sysprep to strip out computer-specific information (e.g., the MAC
address and computer name) to prepare the Windows image for virtualization
Creates a manifest file that contains a list of the image parts with their checksums
Puts all the parts of the AMI into an Amazon S3 bucket you specify
You can use the AWS Management Console, command line, or API to bundle Amazon EC2 instance store-backed Windows AMIs.
Bundling and registering Amazon EC2 instance store-backed Windows images using the console is easy.
To bundle an Amazon EC2 instance store-backed AMIs
Log in to the AWS Management Console and click the box next to the drop-down arrow to open a list of services. Click Amazon Elastic Compute Cloud and then select the Windows instance you want to use, and prepare the instance to meet your specifications.
For information about running an instance, go to Running an Instance.
Right-click the instance you customized and select Bundle Instance (S3 AMI).
The Bundle Instance dialog box opens. It shows the ID of the instance you want to bundle.
Provide your Amazon S3 Key Name and the Amazon S3 Bucket Name where you want the new AMI to be stored, and then click Bundle.
You should see the Bundle Instance message box informing you that you successfully made the bundling request. The message box also provides the Bundle Task ID.
Click View Bundling Tasks to see the status of the task. Click Close to close the message box.
![]() | Note |
|---|---|
The Bundle Tasks status can show waiting-for-shutdown when Amazon EC2 is bundling an Amazon EC2 instance store-backed instance. Amazon EC2 shuts down the instance, bundles it, and puts the new bundle into Amazon S3. |
Navigate to the list of your AMIs when the bundling task is complete, right-click the newly-bundled AMI, and then select Register New AMI.
The Register Image dialog box opens. Provide the AMI Manifest Path and click Register.
To bundle Amazon EC2 instance store-backed AMIs
Log in to the Windows instance and modify it to meet your requirements.
![]() | Note |
|---|---|
We recommend that you change the password of the AMI. If you
use the Amazon EC2-provided password, write it down so you can access instances
launched from this AMI. You cannot get the password for new instances
using the |
If you want to reduce your startup time, delete any temporary files on your
instance using the Disk Cleanup tool, defragment your system using Disk
Defragmenter, and zero out free space using sdelete -c C:\.
You can download the sdelete utility from the
sdelete Download Page
or the
Microsoft Web Site.
Enter the following command to bundle the instance into Amazon S3 on your local system where you have installed the API tools (do not enter this command on the instance you are bundling):
C:\>ec2-bundle-instance<instance_id>-b<bucket_name>-p<bundle_name>-o<access_key_id>-w<secret_access_key>
The <instance_id> is the name of the
instance; <bucket_name> is the name of the
bucket in which to store the AMI; and
<bundle_name> is the common name for the
files to store in Amazon S3.
![]() | Note |
|---|---|
To perform this task, you need your AWS Access Key ID (access_key_id) and AWS Secret Access Key (secret_access_key). For more information, go to Amazon EC2 Credentials. |
The ec2-bundle-instance utility uploads the bundled AMI to a specified bucket. If you have used Amazon S3 before, you can use any of your existing buckets or just give ec2-bundle-instance any name that makes sense to you. If the specified bucket does not exist, the command creates it. If the specified bucket belongs to another AWS account, ec2-bundle-instance fails, and you have to specify a different name.
The following is an example of a fully specified
ec2-bundle-instance command.
C:\>ec2-bundle-instance -31c2425a -bBUNDLE bun-e3a4418a i-31c2425amyawsbucket-pmyimage-oAKIAIOSFODNN7EXAMPLE-wwJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEYmyawsbucketmyimage2010-03-19T08:22:48+0000 2010-03-19T08:22:48+0000 pending
Amazon EC2 shuts down the instance, saves it as an AMI, and restarts it.
Enter the following command to register the image:
C:\>ec2-registermyawsbucket/image.manifest.xml -nimage_nameIMAGE ami-2bb65342
Amazon EC2 returns an AMI identifier, the value next to the
IMAGE tag
(ami-2bb65342 in the example) that you can use to run
instances.
The following procedure steps you through how to bundle an Amazon EC2 instance store-backed AMI. This process mirrors the steps you would use with the command line tools.
To bundle Amazon EC2 instance store-backed AMIs
Log in to the Windows instance and modify it to meet your requirements.
Construct the following request to bundle the instance into Amazon S3 on your local system where you have installed the API tools (do not construct the request on the instance you are bundling):
https://ec2.amazonaws.com/ ?Action=BundleInstance &InstanceId=-i-e468cd8d &Storage.S3.AWSAccessKeyId=AKIAIOSFODNN7EXAMPLE &Storage.S3.Bucket=myawsbucket &Storage.S3.Prefix=winami &Storage.S3.UploadPolicy=eyJleHBpcmF0aW9uIjogIjIwMDgtMDgtMzBUMDg6NDk6MDlaIiwiY29uZGl0aW9ucyI6IFt7ImJ1Y2tldCI6ICJteS1idWNrZXQifSxbInN0YXJ0cy13aXRoIiwgIiRrZXkiLCAibXktbmV3LWltYWdlIl0seyJhY2wiOiAiZWMyLWJ1bmRsZS1yZWEXAMPLEEXAMPLE &Storage.S3.UploadPolicySignature=fh5tyyyQD8W4COEtxxxxxxxEXAMPLE &AuthParams
![]() | Note |
|---|---|
To perform this task, you need your AWS Access Key ID (<aws-access-key-id>) and AWS Secret Access Key (<aws-secret-access-key>). For more information, go to Amazon EC2 Credentials. |
For information about the BundleInstance command, see BundleInstance in the
Amazon Elastic Compute Cloud API Reference.
Construct the following command to register the image:
https://ec2.amazonaws.com/
?Action=RegisterImage
&ImageLocation=full-path-to-amazon-manifest
&AuthParamsAmazon EC2 returns an AMI identifier that you can use to run instances.