| Did this page help you? Yes No Tell us about it... |
Create a bundled AMI from an operating system image created in a loopback file. For more information, go to the Amazon Elastic Compute Cloud User Guide.
![]() | Note |
|---|---|
Scripts that require a copy of the public key from the launch key pair must obtain the key from the instance's metadata (not the key file in the instance store) for instances bundled with the 2007-08-29 AMI tools and later. AMIs bundled before this release will continue to work normally. |
ec2-bundle-image -k
private_key -c
cert -u
user_id -i
image_path -r {i386 | x86_64}
[-d destination] [-p
ami_prefix] [--ec2cert
cert_path] [--kernel
kernel-id] [--ramdisk
ramdisk_id]
[--block-device-mapping
block_device_mapping]
| Option | Description | Required |
|---|---|---|
|
|
The path to the user's PEM-encoded RSA key file. Example: |
Yes |
|
|
The user's PEM encoded RSA public key certificate file. Example: |
Yes |
|
|
The user's AWS account ID without dashes. Do not use the Access Key ID. Example: |
Yes |
|
|
The path to the image to bundle. Example: |
Yes |
|
|
Image architecture. If you don't provide this on the command line, you'll be prompted to provide it when the bundling starts. Valid Values: Example: |
Yes |
|
|
The directory in which to create the bundle. Default: /tmp Example: |
No |
|
|
The filename prefix for bundled AMI files. Default: The name of the image file.
For example, if the image path is
Example: |
No |
|
|
The path to the Amazon EC2 X.509 public key certificate. Default:
Example: |
No |
|
|
The ID of the kernel to select. Default:
Example: |
No |
|
|
The ID of the RAM disk to select. Some kernels require additional drivers at launch. Check the kernel requirements for information on whether you need to specify a RAM disk. To find kernel requirements, go to the Resource Center and search for the kernel ID. Example: |
No |
|
|
Default block-device-mapping scheme with which to launch the AMI. This defines how block devices are exposed to an instance of this AMI if the instance type supports the specified device. The scheme is a comma-separated list of key=value pairs, where each key is a virtual name and each value is the desired device name. Virtual names include:
Example: Example: |
No |
Status messages describing the stages and status of the bundling process.
This example creates a bundled AMI from an operating system image that was created in a loopback file.
$ec2-bundle-image -k pk-HKZYKTAIG2ECMXYIBH3HXV4ZBZQ55CLO.pem -c cert-HKZYKTAIG2ECMXYIBH3HXV4ZBZQ55CLO.pem -u 999988887777 -i image.img -d bundled/ -p fred -r x86_64Please specify a value for arch [i386]: Bundling image file... Splitting bundled/fred.gz.crypt... Created fred.part.00 Created fred.part.01 Created fred.part.02 Created fred.part.03 Created fred.part.04 Created fred.part.05 Created fred.part.06 Created fred.part.07 Created fred.part.08 Created fred.part.09 Created fred.part.10 Created fred.part.11 Created fred.part.12 Created fred.part.13 Created fred.part.14 Generating digests for each part... Digests generated. Creating bundle manifest... ec2-bundle-image complete.