ec2-bundle-image
Syntax
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-mappingblock_device_mapping
]
Description
Create a bundled AMI from an operating system image created in a loopback file. For more information, see
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. During bundling, only the root store is bundled. Data on other instance stores is not preserved. |
Options
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 number without dashes. Do not use the Access Key ID. Example: |
Yes |
|
The path to the image to bundle. Example: |
Yes |
|
The directory in which to create the bundle. Default: The current directory Example: |
No |
|
The filename prefix for bundled AMI files. Default: Example: |
No |
|
The path to the Amazon EC2 X509 public key certificate. Default: Example: |
No |
|
The ID of the kernel to select. For information on finding available kernel IDs, see ec2-describe-images. 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 |
Output
Status messages describing the stages and status of the bundling process.
Example
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 AIDADH4IGTRXXKCD -i image.img -d bundled/ -p fred -r x86_64
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... Bundle Image complete.