CompleteMultipartUpload or AbortMultipartUpload, the uploaded parts remain in the bucket as an incomplete multipart upload. Incomplete multipart uploads consume storage, do not appear in normal object listings, and prevent the bucket from being deleted.
Use this page when you need to:
- Free storage occupied by abandoned upload parts.
- Unblock a
DeleteBucketcall that fails withBucketNotEmpty. - Reset upload state for a client that is stuck or misbehaving.
AbortIncompleteMultipartUpload lifecycle rule. The procedures on this page handle uploads that already exist; the lifecycle rule prevents them from coming back.
Prerequisites
Before you start, make sure you have:- An Access Key for the organization that owns the bucket.
- A configured S3-compatible client (AWS CLI, s3cmd, or Boto3).
- Permission to call
s3:ListBucketMultipartUploadsands3:AbortMultipartUploadon the bucket.
List incomplete multipart uploads
List the incomplete multipart uploads in a bucket. Each upload has a uniqueUploadId and is identified by the object key it was targeting.
- AWS CLI
- s3cmd
- Boto3
Replace The response includes an If the bucket has no incomplete multipart uploads, the response is empty.
[BUCKET-NAME] with the name of your bucket.List incomplete multipart uploads with AWS CLI
Uploads array. Each entry has a Key (the object key the upload targets), an UploadId, and an Initiated timestamp.Example output
A single call returns up to 1000 uploads. To enumerate every incomplete upload in a bucket, paginate using
KeyMarker and UploadIdMarker from the response (or use the Boto3 paginator shown above).Abort a specific multipart upload
Abort one incomplete multipart upload by itsUploadId. All parts already uploaded for that ID are permanently removed.
- AWS CLI
- s3cmd
- Boto3
Replace A successful call returns no output.
[BUCKET-NAME] with your bucket name, [OBJECT-KEY] with the upload’s target key, and [UPLOAD-ID] with the UploadId from the listing.Abort a multipart upload with AWS CLI
Abort every incomplete multipart upload in a bucket
To clear every incomplete multipart upload at once, list them and abort each one in a loop. Use this when you are preparing a bucket for deletion or recovering from a large-scale client failure.- AWS CLI
- s3cmd
- Boto3
This shell loop pages through If the bucket has more than 1000 incomplete multipart uploads, run the loop again until
list-multipart-uploads and aborts every upload it finds. Replace [BUCKET-NAME] with the name of your bucket.Abort all incomplete multipart uploads with AWS CLI
list-multipart-uploads returns an empty response.Verify the bucket is clear
After aborting, re-run the List incomplete multipart uploads procedure. The response should be empty. If you were preparing the bucket for deletion, return to Empty and delete a bucket to finish the remaining cleanup steps.Prevent recurrence
Apply anAbortIncompleteMultipartUpload lifecycle rule to every bucket that accepts large uploads. The rule automatically aborts uploads that have not completed within a number of days you specify, and removes the parts.
Related
- Bucket lifecycle policies: Automate cleanup of incomplete multipart uploads.
- Empty and delete a bucket: Full procedure for removing a bucket and its contents.
s3:ListMultipartUploads: API reference.s3:AbortMultipartUpload: API reference.