aws ec2 create-image
Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that is either running or stopped. AWS CLI reference
9 options Its page in the AWS CLI reference
Options
--block-device-mappingsThe block device mappings.--boot-mode-overrideThe boot mode of the new image, which overrides the default boot mode.--descriptionA description for the new image.--dry-runChecks whether you have the required permissions for the action, without actually making the request, and provides an error response.--instance-idThe ID of the instance.--nameA name for the new image.--no-reboot, --rebootIndicates whether or not the instance should be automatically rebooted before creating the image.--snapshot-locationOnly supported for instances in Local Zones and for instances on Outposts that support local snapshots.--tag-specificationsThe tags to apply to the AMI and snapshots on creation.