| Did this page help you? Yes No Tell us about it... |
Registers a new AMI with Amazon EC2. When you're creating an AMI, this is the final step you must complete before you can launch an instance from the AMI. For more information about creating AMIs, go to Creating Your Own AMIs in the Amazon Elastic Compute Cloud User Guide.
![]() | Note |
|---|---|
For Amazon EBS-backed instances, the |
You can also use the RegisterImage action to create an
EBS-backed AMI from a snapshot of a root device volume. For more information, go to
Launching
an Instance from a Snapshot in the
Amazon Elastic Compute Cloud User Guide.
If needed, you can deregister an AMI at any time. Any modifications you make to an AMI backed by Amazon S3 invalidates its registration. If you make changes to an image, deregister the previous image and register the new image.
| Name | Description | Required |
|---|---|---|
|
|
Full path to your AMI manifest in Amazon S3 storage. Type: String Default: None Condition: Required if registering an Amazon-S3 backed AMI |
Conditional |
|
|
A name for your AMI. Type: String Default: None Constraints: 3-128 alphanumeric characters, parenthesis (()), commas (,), slashes (/), dashes (-), or underscores(_) |
Yes |
|
|
The description of the AMI. Type: String Default: None Constraints: Up to 255 characters. |
No |
|
|
The architecture of the image. Type: String Valid Values: Default: i386 for EBS backed AMIs. Instance store-backed AMIs will try to use the architecture specified in the manifest file. |
No |
|
|
The ID of the kernel to select. Type: String Default: None |
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, refer to the Resource Center and search for the kernel ID. Type: String Default: None |
No |
|
|
The root device name (e.g., /dev/sda1, or xvda). Type: String Default: None Condition: Required if registering an Amazon EBS-backed AMI |
Conditional |
|
|
The device name (e.g., /dev/sdh, or xvdh). Type: String Default: None Condition: If registering an Amazon EBS-backed AMI from a
snapshot, you must at least specify this field with the root
device name (e.g., /dev/sda1, or xvda), and
|
Conditional |
|
|
The virtual device name. Type: String Default: None |
No |
|
|
The ID of the snapshot. Type: String Default: None Condition: If registering an Amazon EBS-backed AMI from a
snapshot, you must at least specify this field with the snapshot
ID, and |
Conditional |
|
|
The size of the volume, in GiBs. Type: Integer Default: None Condition: Required if you are not creating a volume from a snapshot. |
Conditional |
|
|
Specifies that no device should be mapped. Type: Boolean Default: true |
No |
|
|
Whether the Amazon EBS volume is deleted on instance termination. Type: Boolean Default: true |
No |
The elements in the following table are wrapped in a
RegisterImageResponse structure.
| Name | Description |
|---|---|
|
|
The ID of the request. Type: xsd:string |
|
|
Unique ID of the newly registered machine image. Type: xsd:string |
This example registers the AMI specified in the
my-new-image.manifest.xml manifest file, located in the bucket
called mybucket.
https://ec2.amazonaws.com/?Action=RegisterImage &ImageLocation=mybucket/my-new-image.manifest.xml &AUTHPARAMS
This example registers an Amazon EBS snapshot to create an AMI backed by Amazon EBS.
https://ec2.amazonaws.com/?Action=RegisterImage &RootDeviceName=/dev/sda1 &BlockDeviceMapping.1.DeviceName=/dev/sda1 &BlockDeviceMapping.1.Ebs.SnapshotId=snap-6eba6e06 &Name=MyImage &AUTHPARAMS
This example registers the AMI with an Amazon EBS snapshot as the root device, a separate snapshot as a secondary device, and an empty 100 GiB Amazon EBS volume as a storage device.
https://ec2.amazonaws.com/?Action=RegisterImage &RootDeviceName=/dev/sda1 &BlockDeviceMapping.1.DeviceName=/dev/sda1 &BlockDeviceMapping.1.Ebs.SnapshotId=snap-6eba6e06 &BlockDeviceMapping.2.DeviceName=/dev/sdb &BlockDeviceMapping.2.Ebs.SnapshotId=snap-823ea6df &BlockDeviceMapping.3.DeviceName=/dev/sdc &BlockDeviceMapping.3.Ebs.VolumeSize=100 &Name=MyImage &AUTHPARAMS
<RegisterImageResponse xmlns="http://ec2.amazonaws.com/doc/2011-12-15/"> <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> <imageId>ami-78a54043</imageId> </RegisterImageResponse>