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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠