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?

gefragt vor 6 Jahren1161 Aufrufe
2 Antworten
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

beantwortet vor 5 Jahren
0

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

beantwortet vor 3 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen