Skip to main content

AbortMultipartUpload

This operation aborts a multipart upload. After a multipart upload is aborted, no additional parts can be uploaded using that upload ID. The storage consumed by any previously uploaded parts will be freed. However, if any part uploads are currently in progress, those part uploads might or might not succeed. As a result, it might be necessary to abort a given multipart upload multiple times in order to completely free all storage consumed by all parts.

To verify that all parts have been removed and prevent getting charged for the part storage, you should call the ListParts API operation and ensure that the parts list is empty.

Permissions

ActionDescriptionResource
AbortMultipartUploadGrants permission to abort a multipart uploadobject

The following operations are related to :

Request Syntax

DELETE /Bucket/Key+?uploadId=UploadId HTTP/1.1
Host: partition.s3.astran.io

URI Request Parameters

The request uses the following URI parameters.

Bucket

The bucket name to which the upload was taking place.

Required: Yes

Key

Key of the object for which the multipart upload was initiated.

Length Constraints: Minimum length of 1.

Required: Yes

uploadId

Upload ID that identifies the multipart upload.

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 204

Response Elements

If the action is successful, the service sends back an HTTP 204 response.

The response returns the following HTTP headers.

Errors

NoSuchUpload

The specified multipart upload does not exist.

HTTP Status Code: 404

Examples

The following request aborts a multipart upload identified by its upload ID.

               DELETE /example-bucket/example-object?uploadId=VXBsb2FkIElEIGZvciBlbHZpbmcncyBteS1tb3ZpZS5tMnRzIHVwbG9hZ HTTP/1.1
Host: <partition>.s3.astran.io
Date: Mon, 1 Nov 2010 20:34:56 GMT
Authorization: authorization string

This example illustrates one usage of AbortMultipartUpload.

               HTTP/1.1 204 OK
x-request-id: 996c76696e6727732072657175657374
Date: Mon, 1 Nov 2010 20:34:56 GMT
Content-Length: 0
Connection: keep-alive

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: