By using AWS re:Post, you agree to the Terms of Use
/VM Export: An error occurred (InvalidParameter) when calling the ExportImage operation: The image ID provided does not exist/

VM Export: An error occurred (InvalidParameter) when calling the ExportImage operation: The image ID provided does not exist

0

I'm trying to export the image of an EC2 VM: t2.medium, Ubuntu 20.04 LTS. The instance is stopped during the operation.

I created the vmimport role, created a service role and a role policy as described. AWS CLI credentials correspond to a DevOps role, which should be sufficient for the operation.

The resulting command looks like

aws ec2 export-image \
    --image-id ami-09e67e426f25ce0d7  \
    --disk-image-format VMDK \
    --s3-export-location S3Bucket=auditor-updates,S3Prefix=export/

Command returns the error An error occurred (InvalidParameter) when calling the ExportImage operation: The image ID (ami-09e67e426f25ce0d7) provided does not exist

AMI ID typo is impossible, I just copied it from the instance page of the EC2 console.

If I met any export limitations, how do I know which exactly?

1 Answers
0

Hello,

There are various limitations in exporting images: https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport_image.html#limits-image-export

It appears that image is owned by AWS, and therefore shared with other accounts. Copy the love to your account: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html https://docs.aws.amazon.com/cli/latest/reference/ec2/copy-image.html

and then export the image:

https://docs.aws.amazon.com/cli/latest/reference/ec2/export-image.html

Thanks Joel

answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions