proutray
proutray

Reputation: 2033

Why am I geting "Disk validation failed [Invalid S3 source location]" while doing "aws ec2 import-image"?

I am trying to import a VM to ec2. My containers.json file

[
 {
   "Description": "Cloudera task",
   "Format": "ova",
   "UserBucket": {
    "S3Bucket": "cdh-5.5.0.0-sandbox",
    "S3Key": "cloudera-quickstart-vm-5.5.0-0-virtualbox.ova"
    }
 }
]

And my command is :

aws ec2 import-image --description "Cloudera Sandbox" --disk-containers file://containers-cdh.json

However, my import task is failing with

"StatusMessage": "ClientError: Disk validation failed [Invalid S3 source location]"

Upvotes: 1

Views: 3421

Answers (2)

helloV
helloV

Reputation: 52403

Are you sure the bucket name is correct? Does the bucket exist? Can you run the CLI command aws s3 ls s3://cdh-5.5.0.0-sandbox ? It will give you a clue.

Invalid S3 source location

The command syntax or Amazon S3 bucket name is incorrect.

Resolution

Create a new Amazon S3 bucket in the appropriate region solely for VM Import and upload the VM files to the root of the bucket.

Upvotes: 0

veerat
veerat

Reputation: 105

This error can be due to the invalid s3 bucket name. s3 bucket names should not have hyphens.

Upvotes: 4

Related Questions