GET /#Action=CreateImage
Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that is either running or stopped.
By default, when Amazon EC2 creates the new AMI, it reboots the instance so that it can take snapshots of the attached volumes while data is at rest, in order to ensure a consistent state. You can set the NoReboot
parameter to true
in the API request, or use the --no-reboot
option in the CLI to prevent Amazon EC2 from shutting down and rebooting the instance.
If you choose to bypass the shutdown and reboot process by setting the NoReboot
parameter to true
in the API request, or by using the --no-reboot
option in the CLI, we can't guarantee the file system integrity of the created image.
If you customized your instance with instance store volumes or Amazon 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.
For more information, see Create an Amazon EBS-backed Linux AMI in the Amazon Elastic Compute Cloud User Guide.
Servers
- https://ec2.{region}.amazonaws.com
- https://ec2.amazonaws.com
- https://ec2.{region}.amazonaws.com.cn
Request headers
Name | Type | Required | Description |
---|---|---|---|
X-Amz-Content-Sha256 |
String | No | |
X-Amz-Credential |
String | No | |
X-Amz-Date |
String | No | |
X-Amz-Algorithm |
String | No | |
X-Amz-SignedHeaders |
String | No | |
X-Amz-Security-Token |
String | No | |
X-Amz-Signature |
String | No |
Query parameters
Name | Type | Required | Description |
---|---|---|---|
InstanceId |
String | Yes |
The ID of the instance. |
Version |
String | Yes |
Possible values:
|
NoReboot |
Boolean | No |
By default, when Amazon EC2 creates the new AMI, it reboots the instance so that it can take snapshots of the attached volumes while data is at rest, in order to ensure a consistent state. You can set the If you choose to bypass the shutdown and reboot process by setting the Default: |
BlockDeviceMapping[] |
Array | No |
The block device mappings. This parameter cannot be used to modify the encryption status of existing volumes or snapshots. To create an AMI with encrypted snapshots, use the CopyImage action. |
Name |
String | Yes |
A name for the new image. Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_) |
TagSpecification[] |
Array | No |
The tags to apply to the AMI and snapshots on creation. You can tag the AMI, the snapshots, or both.
If you specify other values for To tag an AMI or snapshot after it has been created, see CreateTags. |
DryRun |
Boolean | No |
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is |
Description |
String | No |
A description for the new image. |
Action |
String | Yes |
Possible values:
|
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.