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?

已提問 6 年前檢視次數 1161 次
2 個答案
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

已回答 5 年前
0

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

已回答 3 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南