createImage

abstract suspend fun createImage(input: CreateImageRequest): CreateImageResponse

Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that is either running or stopped.

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.

The location of the source instance determines where you can create the snapshots of the AMI:

  • If the source instance is in a Region, you must create the snapshots in the same Region as the instance.

  • If the source instance is in a Local Zone, you can create the snapshots in the same Local Zone or in its parent Region.

  • If the source instance is on an Outpost that supports local snapshots, you can create the snapshots on the same Outpost or in the parent Region of that Outpost. In this case, you must use the SnapshotLocation parameter to specify where to create the snapshots.

For more information, see Create an Amazon EBS-backed AMI in the Amazon Elastic Compute Cloud User Guide.