Before we started, there are prerequisites to be done first.
1. Setting up EC2 CLI to work with your terminal. Test it with simple command:
> ec2-describe-regions2. Create S3 bucket, name it anything you want. Mine is "instance-manifest". This bucket will save our VMDK's manifest and small VMDK parts then convert them to EC2 instance.
3. Now use this command to start importing VMDK:
> ec2-import-instance -o <Access Key> -w <Secret Key> -t <Instance Type> -a x86_64 -f <File Type> -p <Platform> -b <Bucket name> -s <EBS disk size> -z <Availability Zone> "\path\to\file.vmdk"Change to red highlight to appropriated value to suit your environment.
Example Command:
> ec2-import-instance -o Your_Access_Key -w Your_Secret_Key -t t2.micro -a x86_64 -f VMDK -p Linux -b instance-manifest -s 10 -z ap-southeast-1a "D:\Downloads\ubuntu-disk1-streamed.vmdk"4. Let's check to status of importing with the following command:
> ec2-describe-conversion-tasks --region <region_name>or
> ec2-describe-conversion-tasks <task_id>5. When the importing is done. Go to AWS console, EC2 then you'll see new instance from conversion.