I am trying to import an OVA into AWS using the aws CLI. To do this I run the following command:
aws ec2 import-image import-image --client-token 653151442415980 --disk-containers '[{"UserBucket":{"S3Key":"my.ova","S3Bucket":"my bucket"},"Description":"my import"}]' --platform 'Linux'
When I do this, I get an AMI name like "ami-import-sfwerwf". I really need this to be more descriptive in the name, so this doesn't work well for me.
Ideally, I could specify the name on import, but changing it after the import is complete would work too. I would really like to avoid having to create an instance and then save it as an AMI afterwards.
Best Answer
The only way that I can find to do this is to do an
image-copy
after the import. Theimage-copy
command takes name and description parameters, which will then be given to the copy.After that completes successfully, then you can remove the original with: