I need to import a Gen2 Hyper-V machine to AWS and I'm following the document here: https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html
All works fine until I use this command to upload the image:
aws ec2 import-image --description "XYZVM" --license-type AWS --disk-containers file://containers.json
containers.json file is like this:
[
{
"Description": "First disk",
"Format": "vhdx",
"UserBucket": {
"S3Bucket": "xyzvmimport",
"S3Key": "xyWin10.vhdx"
}
},
{
"Description": "Second disk",
"Format": "vhdx",
"UserBucket": {
"S3Bucket": "xyzvmimport",
"S3Key": "xyWin11.vhdx"
}
}
]
vhdx files & container.json are on the same folder. I run the command from within the folder as an administrator but I get this error:
An error occurred (InvalidParameter) when calling the ImportImage operation: S3 key does not exist: xyWin10.vhdx
I also made sure that the files have full access to "everyone" to make sure it's not a permission issue.
What's happening here? Why is this tool not working?