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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ