Menu
Amazon Elastic Compute Cloud
User Guide for Linux Instances

Checking on the Status of Your Import Image Task

The aws ec2 describe-import-image-tasks command returns the status of an import task. Status values include the following:

  • active—Your task is active and currently in progress.

  • deleting—Your task is currently being cancelled.

  • deleted—Your task is canceled.

  • completed—Your task is complete and the AMI is ready to use.

To check the status of your import task

Use the aws ec2 describe-import-image-tasks command to return the status of the task. The syntax of the command is as follows:

Example using the aws ec2 describe-import-image-tasks command:

The following example enables you to see the status of your import task.

$ aws ec2 describe-import-image-tasks --cli-input-json "{ \"ImportTaskIds\": [\"import-ami-fgxn195v\"], \"NextToken\": \"abc\", \"MaxResults\": 10 } "

Example Response

The following response shows the output from the aws ec2 describe-import-image-tasks command.

<DescribeImportImageTasksResponse xmlns="http://ec2.amazonaws.com/doc/2015-03-01/">
    <importImageTaskSet>
        <item>
            <platform>Windows</platform>
            <importTaskId>import-ami-fgs8im0c</importTaskId>
            <imageId>ami-4a6c2722</imageId>
            <status>completed</status>
            <description>Linux OVA</description>
            <architecture>x86_64</architecture>
            <snapshotTaskDetailSet>
                <item>
                    <diskImageSize>3.115815424E9</diskImageSize>
                    <deviceName>/dev/sda1</deviceName>
                    <description>First CLI task</description>
                    <format>VMDK</format>
                    <url>https://mys3bucket/vms/my-linux-vm.ova?AWSAccessKeyId=myAccessKeyId&Expires=expirationDate&Signature=mySignature</url>
                </item>
            </snapshotTaskDetailSet>
            <licenseType>AWS</licenseType>
        </item>
    </importImageTaskSet>
    <requestId>377ec1ca-6a47-42f5-8b84-aa07ff87f7b0</requestId>
</DescribeImportImageTasksResponse>