Canceling a Multipart Upload

You can cancel a multipart upload or a sub-part if you do not want to reconstitute the object. This action deletes the multipart upload and all the parts you already uploaded.

You also need to delete each sub-part you created in the multipart upload.

To ensure your multipart upload is canceled, you can check that the list of uploaded parts is empty. For more information, see Listing Parts in a Multipart Upload.

This feature is not available from Cockpit. This documentation only describes the procedure using AWS CLI.

To cancel a multipart upload, use the abort-multipart-upload command following this syntax:

Request sample
$ aws s3api abort-multipart-upload \
    --profile YOUR PROFILE \
    --bucket BUCKET \
    --key MULTIPART_UPLOAD \
    --upload-id 2~xrosnH8pbKTk3sjXijfGIUN1KAEM3Yc \
    --endpoint https://oos.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • bucket: The bucket in which you want to cancel the multipart upload or the sub-part.

  • key: The name of the multipart upload or the name of the sub-part you want to cancel.

  • upload-id: The ID of the upload you received when creating a multipart upload. For more information, see Creating a Multipart Upload.

  • endpoint: The endpoint corresponding to the Region you want to send the request to.

The multipart upload or the sub-part is canceled and deleted, and all its uploaded parts are also deleted.

Related Page

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.