CmdID

CmdID / aws / aws ec2

aws ec2 create-restore-image-task

Starts a task that restores an AMI from an Amazon S3 object that was previously created by using CreateStoreImageTask. AWS CLI reference

1 example 5 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To restore an AMI from an S3 bucket

The following create-restore-image-task example restores an AMI from an S3 bucket. Use the values for S3ObjectKey and Bucket from the describe-store-image-tasks output, specify the object key of the AMI and the name of the S3 bucket to which the AMI was copied, and specify the name for the restored AMI. The name must be unique for AMIs in the Region for this account. The restored AMI will receive a new AMI ID.

aws ec2 create-restore-image-task --object-key ami-1234567890abcdef0.bin --bucket amzn-s3-demo-bucket --name 'New AMI Name'Identify
--object-keyThe name of the stored AMI object in the bucket.
--bucketThe name of the Amazon S3 bucket that contains the stored AMI object.
--nameThe name for the restored AMI.
Its output
{
    "ImageId": "ami-0eab20fe36f83e1a8"
}

For more information, see Store and restore an AMI using S3 in the Amazon EC2 User Guide.

Options

5 in the AWS CLI reference
--bucketThe name of the Amazon S3 bucket that contains the stored AMI object.
--dry-runChecks whether you have the required permissions for the action, without actually making the request, and provides an error response.
--nameThe name for the restored AMI.
--object-keyThe name of the stored AMI object in the bucket.
--tag-specificationsThe tags to apply to the AMI and snapshots on restoration.