I had similar problem with OVA images exported from VirtualBox. In my case converting it to raw image format worked. So if you are using VirtualBox, import the OVA to it, and then convert VDI storage drive to raw. For example:
VBoxManage clonehd "/mnt/b/VirtualBox VMs/ub.vdi" ./ub.img --format raw
Then you upload ub.img to S3, and use that in your containers.json file for aws ec2 import-image command. For example:
[
{
"Description": "My Server OVA",
"Format": "raw",
"Url": "s3://<your-s3-bucket>/ub.img"
}
]
The command:
aws ec2 import-image --description "My server VM" --disk-containers "file:///./containers.json"
and to monitor the import process:
aws ec2 describe-import-image-tasks --import-task-ids <import-id-from-previous-command>