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 Digg

CreateImage

Description

Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that is in either the running or stopped state. For more information about Amazon EBS-backed AMIs, go to Amazon EBS-Backed AMIs and Instances.

[Note]Note

If you customized your instance with ephemeral storage devices or additional EBS volumes besides the root device, the new AMI contains block device mapping information for those storage devices and volumes. When you then launch an instance from your new AMI, the instance automatically launches with the additional devices and volumes.

Request Parameters

NameDescriptionRequired

InstanceId

The ID of the instance.

Type: String

Default: None

Yes

Name

A name for the new image you're creating.

Type: String

Default: None

Constraints: 3-128 alphanumeric characters, parenthesis (()), commas (,), slashes (/), dashes (-), or underscores(_)

Yes

Description

A description of the new image.

Type: String

Default: None

Constraints: Up to 255 characters

No

NoReboot

By default this parameter is set to false, which means Amazon EC2 attempts to cleanly shut down the instance before image creation and reboots the instance afterwards. When the parameter is set to true, Amazon EC2 does not shut down the instance before creating the image. When this option is used, file system integrity on the created image cannot be guaranteed.

Type: Boolean

Default: false

No

Response Elements

The elements in the following table come wrapped in a CreateImageResponse structure.

NameDescription

requestId

The ID of the request.

Type: xsd:string

imageId

The ID of the AMI.

Type: xsd:string

Examples

Example Request

This example creates an AMI from the i-10a64379 instance.

https://ec2.amazonaws.com/?Action=CreateImage
&Description=Standard+Web+Server+v1.0
&InstanceId=i-10a64379
&Name=standard-web-server-v1.0
&AuthParams

Example Response

<CreateImageResponse xmlns="http://ec2.amazonaws.com/doc/2010-08-31/">
   <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
   <imageId>ami-4fa54026</imageId>
</CreateImageResponse>