| « PreviousNext » | |
![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that is either running or stopped. For more information about Amazon EBS-backed AMIs, see Storage for the Root Device.
Note
If you customized your instance with instance store volumes or EBS volumes in addition to the root device volume, the new AMI contains block device mapping information for those volumes. When you launch an instance from this new AMI, the instance automatically launches with those additional volumes.
InstanceIdThe ID of the instance.
Type: String
Default: None
Required: Yes
NameA name for the new image.
Type: String
Default: None
Constraints: 3-128 alphanumeric characters, parenthesis (()), commas (,), slashes (/), dashes (-), or underscores(_)
Required: Yes
DescriptionA description of the new image.
Type: String
Default: None
Constraints: Up to 255 characters
Required: No
NoRebootBy default this parameter is set to false,
which means Amazon EC2 attempts to cleanly shut down the
instance before image creation and then reboots the instance.
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
Required: No
BlockDeviceMapping.n.DeviceNameThe device name exposed to the instance (for example, /dev/sdh or xvdh). For more information, see Block Device Mapping.
Type: String
Default: None
Required: Conditional
Condition: If you're registering an Amazon EBS-backed AMI from a snapshot, you must specify DeviceName
with the root device name (for example, /dev/sda1 or xvda), and
BlockDeviceMapping.n.Ebs.SnapshotId with the snapshot ID
BlockDeviceMapping.n.NoDeviceSuppresses a device mapping.
Type: Boolean
Default: true
Required: No
BlockDeviceMapping.n.VirtualNameThe name of the virtual device, ephemeral[0..3]. The number of instance store volumes depends on the instance type.
Type: String
Default: None
Required: No
BlockDeviceMapping.n.Ebs.SnapshotIdThe ID of the snapshot.
Type: String
Default: None
Required: Conditional
Condition: If you're registering an Amazon EBS-backed AMI from a
snapshot, you must at least specify SnapshotId with the snapshot
ID, and BlockDeviceMapping.n.DeviceName
with the root device name.
BlockDeviceMapping.n.Ebs.VolumeSizeThe size of the volume, in GiBs.
Type: Integer
Valid values: If the volume type is io1, the minimum size of the volume is 10 GiB.
Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
Required: No
BlockDeviceMapping.n.Ebs.DeleteOnTerminationWhether the volume is deleted on instance termination.
Type: Boolean
Default: true
Required: No
BlockDeviceMapping.n.Ebs.VolumeTypeThe volume type.
Type: String
Valid values: standard | io1
Default: standard
Required: No
BlockDeviceMapping.n.Ebs.IopsThe number of I/O operations per second (IOPS) that the volume supports.
Type: Integer
Valid values: Range is 100 to 4000.
Default: None
Required: Required when the volume type is io1; not used with standard volumes.
The following elements are returned in a
CreateImageResponse element.
requestIdThe ID of the request.
Type: xsd:string
imageIdThe ID of the AMI.
Type: xsd:string
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
<CreateImageResponse xmlns="http://ec2.amazonaws.com/doc/2013-02-01/"> <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> <imageId>ami-4fa54026</imageId> </CreateImageResponse>