Parameter Validation Error using 'aws ec2 import-image'

0

Objective is to pull .vmdk from S3 to EC2, but getting errors around the flag

--disk-containers

Using Ubuntu 18.04
Linux version 4.15.0-30-generic (buildd@lgw01-amd64-060)
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)

$ aws ec2 import-image --description TestVM --license-type BYOL --disk-containers UserBucket={"S3Bucket":"vm-test-data","S3Key":"VM-for-input.vmdk"} --dry-run

Parameter validation failed:
Invalid type for parameter DiskContainers[0].UserBucket, value: S3Bucket:vm-test-data, type: <class 'str'>, valid types: <class 'dict'>
Invalid type for parameter DiskContainers[1].UserBucket, value: S3Key:VM-for-input.vmdk, type: <class 'str'>, valid types: <class 'dict'>

I've also run this using a JSON file per the documentation, but that receives a strange error as well:

Error parsing parameter '--disk-containers': Expected: '=', received: 'EOF' for input:
container.json

Has anyone encountered this or can see a way around it?

asked 6 years ago1148 views
2 Answers
0

Hi,

I'd like to know if you were able to execute this command correctly, it's happening to me, so I don't really know what's the correct way to run this.

I'm using the example provided in https://docs.aws.amazon.com/es_es/vm-import/latest/userguide/vmimport-image-import.html

aws ec2 import-image --description "SOMETHING X" --license-type auto --disk-containers Description="BUSPDI",Format="vhdx",UserBucket={S3Bucket="migracion-dev803xx",S3Key="PDI.vhdx"} --dry-run

answered 5 years ago
0

Same error here, trying to convert an OVA to AMI, does anybody knows the right way to do it ?

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions