While working on a project, I needed to be able to import OVAs into my Amazon AWS account for use in various ways.
What I discovered is that Amazon’s documentation on this process is rather… dense and confusing. I spent a good amount of time trying to decipher what the documentation was actually telling me to do, but I finally cracked the code.
So, I thought I would document my steps here for my own benefit, and hopefully, this will save someone the time and hassle I went through.
CAVEAT – This process was successfully tested using an OVA. I do not know how (or if) it will work with a VMDK, OVF, VHD, or other file formats.
Directions
- Save the import.json file in a directory
- Import the OVA into an S3 bucket.
- In the S3 bucket, select the OVA and choose “Copy S3 URI”.
- Edit the
Url
value in the import.json file and paste the S3 URL value. - Edit the
Description
value in the import.json file and provide an appropriate description. - Open a command prompt and navigate to the directory where you saved the
import.json
file - Run the command
aws ec2 import-image --description "ENTER VALUE HERE" --disk-containers "file://import.json”
description
is a text value used to describe the import task.file://
points to the location of the saved import.json file. If you did not navigate to the directory where the file is located, you will need to specify the full path here.
- The import process will take a few minutes. Use the
aws ec2 describe-import-image-tasks
command to monitor import progress - Once the import process is complete, verify the image is in the AMI library.
- Add tags to the AMI as appropriate to help you recall details such as the source of the OVA and any other relevant details.
import.json file
[ { "Description": "OVA DESCRIPTION", "Format": "ova", "Url": "s3://S3BUCKETNAME/FILENAME" } ]