| Did this page help you? Yes No Tell us about it... |
Creates an AMI that uses an Amazon EBS root device from a "running" or "stopped" instance. For more information about Amazon EBS-backed AMIs, go to Using Amazon EBS-Backed AMIs and Instances.
![]() | 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. |
The short version of this command is ec2cim.
ec2-create-image
instance_id --name name [--description
description] [--no-reboot]
| Name | Description | Required |
|---|---|---|
|
|
The ID of the instance. Type: String Default: None Example: i-10a64379 |
Yes |
|
|
A name for the new image you're creating. Type: String Default: None Constraints: 3-128 alphanumeric characters, parenthesis (()), commas (,), slashes (/), dashes (-), or underscores(_). Allows spaces if the name is enclosed in quotation marks. Example: -n "Standard Web Server" |
Yes |
|
|
A description of the new image. Type: String Default: None Constraints: Up to 255 characters Example: -d Fedora_v11 |
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 Example: --no-reboot |
No |
| Option | Description |
|---|---|
|
|
Overrides the Region specified in the Default: The Example: |
|
|
Default: The Example: |
|
|
The private key to use when constructing requests to Amazon EC2. Default: The value of the Example: |
|
|
The X.509 certificate to use when constructing requests to Amazon EC2. Default: The value of the Example: |
|
|
Specifies a connection timeout (in seconds). Example: --connection-timeout 30 |
|
|
Specifies a request timeout (in seconds). Example: --request-timeout 45 |
|
|
Displays verbose output by showing the SOAP request and response on the command line. This is particularly useful if you are building tools to talk directly to our SOAP API. |
|
|
Displays column headers in the output. |
|
|
Shows empty columns as |
|
|
Do not display tags for tagged resources. |
|
|
Prints internal debugging information. This is useful to assist us when troubleshooting problems. |
|
|
Displays Help. |
|
|
If Example: |
The command returns a table that contains the following information:
IMAGE identifier
Unique ID of the newly registered machine image
Amazon EC2 command line tools display errors on stderr.
This example creates an AMI from the i-10a64379 instance.
PROMPT>ec2-create-image i-10a64379 --name "Standard Web Server" --description "Standard web server AMI"IMAGE ami-4fa54026