ANT
ANT

Reputation: 87

ec2-import-instance doesn't work on Windows

I'm trying to import a vmdk image using ec2-import-instance command but it returns below error:

usage: aws [options] [parameters] aws: error: argument command: Invalid choice, valid choices are:

autoscaling | cloudformation cloudfront
| cloudhsm cloudsearch | cloudsearchdomain etc..

My command is here:

aws ec2-import-instance "C:\AWS-TEST-VM\aws-test-vm-01\aws-test-vm-01-disk1.vmdk" -f vmdk -t m1.small -a x86_64 -b bucket_name -o Access Key –w Secret+Access+Key -p Linux --ignore-region-affinity

Upvotes: 1

Views: 957

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 269540

It appears that you are mixing up two different command-line interfaces.

The 'older-style' commands have hyphenated words, eg:

ec2-import-instance -t instance_type [-g group] -f file_format -a architecture [-p platform_name] -b s3_bucket_name ...

The newer AWS Command-Line Interface (CLI) uses the syntax of aws <service> <command> <parameters>, for example:

aws ec2 import-image [--description <value>] [--disk-containers <value>] [--license-type <value>] ...

See:

Upvotes: 1

Related Questions