To export virtual machines for deployment to on-premises virtualization environments, AWS supports direct export from EC2 Instance through AWS CLI.

Run the aws ec2 create-instance-export-task command to initiate the task of exporting EC2 Instance to a format suitable for the target virtualization environment. You need to enter the following parameters:
--instance-id: Instance ID obtained from the EC2 instances list.--target-environment: Target virtualization environment (e.g., vmware)--export-to-s3-task: Specify the parameters of the exported virtual machine:To avoid input errors, create a JSON file export-task.json containing the parameters for --export-to-s3-task:
{
"ContainerFormat": "ova",
"DiskImageFormat": "VMDK",
"S3Bucket": "export-bucket-2026-1a",
"S3Prefix": "vms/"
}

aws ec2 create-instance-export-task --region ap-southeast-1 --instance-id i-xxxxxxx --target-environment vmware --export-to-s3-task file://export-task.json
You can modify the parameters as appropriate (such as region and instance id)

The export process may take some time (approximately 60 minutes). Use the following command to check progress:
aws ec2 describe-export-tasks --export-task-ids <ExportTaskID>
You can modify the parameters as appropriate (such as replacing export-i-xxxxxxx with your export-task-ids)


After downloading the disk image file (VMDK or VHD) to the on-premises system, you can deploy the virtual machine using this file on the corresponding virtualization platform (VMware or Hyper-V).