aws ec2 create-instance-export-task
Exports a running or stopped instance to an Amazon S3 bucket. AWS CLI reference
1 example 5 options Its page in the AWS CLI reference
Examples
To export an instance
The following create-instance-export-task example creates a task to export the instance i-1234567890abcdef0 to the Amazon S3 bucket myexportbucket.
aws ec2 create-instance-export-task --description "RHEL5 instance" --instance-id i-1234567890abcdef0 --target-environment vmware --export-to-s3-task DiskImageFormat=vmdk,ContainerFormat=ova,S3Bucket=myexportbucket,S3Prefix=RHEL5Identify--descriptionA description for the conversion task or the resource being exported.--instance-idThe ID of the instance.--target-environmentThe target virtualization environment.--export-to-s3-taskThe format and location for an export instance task.Its output
{
"ExportTask": {
"State": "active",
"InstanceExportDetails": {
"InstanceId": "i-1234567890abcdef0",
"TargetEnvironment": "vmware"
},
"ExportToS3Task": {
"S3Bucket": "myexportbucket",
"S3Key": "RHEL5export-i-fh8sjjsq.ova",
"DiskImageFormat": "vmdk",
"ContainerFormat": "ova"
},
"Description": "RHEL5 instance",
"ExportTaskId": "export-i-fh8sjjsq"
}
}For more information, see Export an EC2 instance as a VM using VM Import/Export in the VM Import/Export User Guide.
Options
--descriptionA description for the conversion task or the resource being exported.--export-to-s3-taskThe format and location for an export instance task.--instance-idThe ID of the instance.--tag-specificationsThe tags to apply to the export instance task during creation.--target-environmentThe target virtualization environment.