CreateImage
Description
Creates an AMI that uses an Amazon EBS root device from a "running" or "stopped" instance.
AMIs that use an Amazon EBS root device boot faster than AMIs that use instance stores. They can be up to 1 TiB in size, use storage that persists on instance failure, and can be stopped and started.
Request Parameters
Name | Description | Required |
---|---|---|
| The ID of the instance. Type: String Default: None | Yes |
| The name of the AMI that was provided during image creation. Type: String Default: None Constraints: 3-128 alphanumeric characters, parenthesis (()), commas (,), slashes (/), dashes (-), or underscores(_) | Yes |
| The description of the AMI that was provided during image creation. Type: String Default: None Constraints: Up to 255 characters | No |
| By default this property is set to false, which means Amazon EC2 attempts to cleanly shut down the instance before image creation and reboots the instance afterwards. When 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
Name | Description |
---|---|
|
Type: |
Ancestor: None
Children: requestId
, imageId
requestId
The ID of the request.
Type: xsd:string
Ancestor: CreateImageResponseType
Children: None
imageId
The ID of the AMI.
Type: xsd:string
Ancestor: CreateImageResponseType
Children: None
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/2009-10-31/"> <ImageId>ami-4fa54026</ImageId> </CreateImageResponse>