Menu
Amazon Elastic Compute Cloud
User Guide for Linux Instances

Canceling an Upload

Use ec2-cancel-conversion-task to cancel an active import task. The task can be the upload of an instance or a volume. The command removes all artifacts of the import, including uploaded volumes or instances.

If the import is complete or still transferring the final disk image, the command fails and returns an exception similar to the following:

Client.CancelConversionTask Error: Failed to cancel conversion task import-i-fh95npoc 

To cancel an upload task

Use the task ID of the upload you want to delete with ec2-cancel-conversion-task.

Example

The following example cancels the upload associated with the task ID import-i-fh95npoc.

$ ec2-cancel-conversion-task import-i-fh95npoc

The output for a successful cancellation is similar to the following:

CONVERSION-TASK import-i-fh95npoc

You can use the ec2-describe-conversion-tasks command to check the status of the cancellation as in the following example:

$ ec2-describe-conversion-tasks import-i-fh95npoc
TaskType        IMPORTINSTANCE  TaskId  import-i-fh95npoc       ExpirationTime  2010-12-20T18:36:39+00:00       Status  cancelled   InstanceID      i-1234567890abcdef0
DISKIMAGE       DiskImageFormat VMDK    DiskImageSize   2671981568      VolumeSize      40      AvailabilityZone        us-east-1c  ApproximateBytesConverted       0       Status  cancelled

In this example, the status is cancelled. If the upload were still in process, the status would be cancelling.