> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Abort incomplete multipart uploads

> Find and abort incomplete multipart uploads to free storage and unblock bucket deletion.

A multipart upload (MPU) is an S3-compatible operation that uploads a large object in independent parts. If the client crashes, loses its connection, or otherwise stops before calling `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 `DeleteBucket` call that fails with `BucketNotEmpty`.
* Reset upload state for a client that is stuck or misbehaving.

To prevent incomplete multipart uploads from accumulating in the first place, configure an [`AbortIncompleteMultipartUpload` lifecycle rule](/products/storage/object-storage/buckets/lifecycle-policies#common-configurations). 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](/products/storage/object-storage/auth-access/manage-access-keys/create-keys) for the organization that owns the bucket.
* A configured [S3-compatible client](/products/storage/object-storage/buckets/manage-buckets#manage-buckets-programmatically) (AWS CLI, s3cmd, or Boto3).
* Permission to call [`s3:ListBucketMultipartUploads`](/products/storage/object-storage/reference/object-storage-s3#s3listmultipartuploads) and [`s3:AbortMultipartUpload`](/products/storage/object-storage/reference/object-storage-s3#s3abortmultipartupload) on the bucket.

## List incomplete multipart uploads

List the incomplete multipart uploads in a bucket. Each upload has a unique `UploadId` and is identified by the object key it was targeting.

<Tabs>
  <Tab title="AWS CLI">
    Replace `[BUCKET-NAME]` with the name of your bucket.

    ```bash title="List incomplete multipart uploads with AWS CLI" theme={"system"}
    aws s3api list-multipart-uploads --bucket [BUCKET-NAME]
    ```

    The response includes an `Uploads` array. Each entry has a `Key` (the object key the upload targets), an `UploadId`, and an `Initiated` timestamp.

    ```text title="Example output" theme={"system"}
    {
        "Uploads": [
            {
                "Key": "datasets/large-archive.tar",
                "UploadId": "2~JZ8QkN9R-EXAMPLE-UPLOAD-ID",
                "Initiated": "2026-04-15T20:14:03.000Z"
            }
        ]
    }
    ```

    If the bucket has no incomplete multipart uploads, the response is empty.
  </Tab>

  <Tab title="s3cmd">
    Replace `[BUCKET-NAME]` with the name of your bucket.

    ```bash title="List incomplete multipart uploads with s3cmd" theme={"system"}
    s3cmd multipart s3://[BUCKET-NAME]
    ```

    The output lists each in-progress upload with its initiation timestamp, target key, and upload ID.
  </Tab>

  <Tab title="Boto3">
    1. Set environment variables for your CoreWeave credentials:

       ```bash theme={"system"}
       export ACCESS_KEY_ID="[ACCESS-KEY-ID]"
       export SECRET_ACCESS_KEY="[SECRET-ACCESS-KEY]"
       ```

       Alternatively, configure your CoreWeave credentials to work with the AWS CLI.

       We recommend using a separate profile for CoreWeave AI Object Storage to avoid conflicts with your other AWS profiles and S3-compatible services. If you don't set up this configuration, you might encounter errors when using AI Object Storage.

           <Accordion title="Configure CoreWeave credentials">
             1. Create a new credentials file and profile in your CoreWeave configuration directory.

                ```bash title="Create a new credentials file and profile" theme={"system"}
                AWS_SHARED_CREDENTIALS_FILE=~/.coreweave/cw.credentials aws configure --profile cw
                ```

             2. When prompted, provide the following values:

                * **AWS Access Key ID**: The [Access Key](/products/storage/object-storage/auth-access/manage-access-keys/create-keys) ID of your CoreWeave AI Object Storage Access Key.
                * **AWS Secret Access Key**: The Secret Key of your CoreWeave AI Object Storage Access Key.
                * **Default region name** (Optional): To set a default region, see [CoreWeave Availability Zones](/products/storage/object-storage/buckets/manage-buckets#availability-zones).
                * **Default output format**: Use `json` for JSON output.

             3. Set the default endpoint URL to the appropriate endpoint for your use case:

                * The primary endpoint, `https://cwobject.com`, for use outside a CoreWeave cluster.
                * The LOTA endpoint, `http://cwlota.com`, for use inside a CoreWeave cluster. The LOTA endpoint routes to the LOTA path for best performance.

                ```bash title="Set the primary endpoint for local development" theme={"system"}
                AWS_CONFIG_FILE=~/.coreweave/cw.config aws configure set endpoint_url https://cwobject.com --profile cw
                ```

             4. Set the S3 `addressing_style` to `virtual`:

                ```bash title="Set virtual addressing style" theme={"system"}
                AWS_CONFIG_FILE=~/.coreweave/cw.config aws configure set s3.addressing_style virtual --profile cw
                ```

             If you set `endpoint_url` and `s3.addressing_style` directly in your code (for example, in a Boto3 `Config` object), you can skip steps 3 and 4. The profile only needs the access key, secret key, and region.
           </Accordion>

    2. Replace `[BUCKET-NAME]` with the name of your bucket.

       ```python title="List incomplete multipart uploads with Boto3" theme={"system"}
       import os
       import boto3
       from botocore.client import Config

       boto_config = Config(
           region_name='US-EAST-04A',
           s3={'addressing_style': 'virtual'}
       )

       s3 = boto3.client(
           's3',
           endpoint_url='https://cwobject.com',
           aws_access_key_id=os.environ['ACCESS_KEY_ID'],
           aws_secret_access_key=os.environ['SECRET_ACCESS_KEY'],
           config=boto_config
       )

       paginator = s3.get_paginator('list_multipart_uploads')
       for page in paginator.paginate(Bucket='[BUCKET-NAME]'):
           for upload in page.get('Uploads', []):
               print(f"{upload['Initiated']}  {upload['UploadId']}  {upload['Key']}")
       ```
  </Tab>
</Tabs>

<Note>
  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).
</Note>

## Abort a specific multipart upload

Abort one incomplete multipart upload by its `UploadId`. All parts already uploaded for that ID are permanently removed.

<Tabs>
  <Tab title="AWS CLI">
    Replace `[BUCKET-NAME]` with your bucket name, `[OBJECT-KEY]` with the upload's target key, and `[UPLOAD-ID]` with the `UploadId` from the listing.

    ```bash title="Abort a multipart upload with AWS CLI" theme={"system"}
    aws s3api abort-multipart-upload \
        --bucket [BUCKET-NAME] \
        --key [OBJECT-KEY] \
        --upload-id [UPLOAD-ID]
    ```

    A successful call returns no output.
  </Tab>

  <Tab title="s3cmd">
    s3cmd identifies an upload by its `UploadId` and target object URI. Replace `[BUCKET-NAME]`, `[OBJECT-KEY]`, and `[UPLOAD-ID]` with values from the listing.

    ```bash title="Abort a multipart upload with s3cmd" theme={"system"}
    s3cmd abortmp s3://[BUCKET-NAME]/[OBJECT-KEY] [UPLOAD-ID]
    ```
  </Tab>

  <Tab title="Boto3">
    ```python title="Abort a multipart upload with Boto3" theme={"system"}
    import os
    import boto3
    from botocore.client import Config

    boto_config = Config(
        region_name='US-EAST-04A',
        s3={'addressing_style': 'virtual'}
    )

    s3 = boto3.client(
        's3',
        endpoint_url='https://cwobject.com',
        aws_access_key_id=os.environ['ACCESS_KEY_ID'],
        aws_secret_access_key=os.environ['SECRET_ACCESS_KEY'],
        config=boto_config
    )

    s3.abort_multipart_upload(
        Bucket='[BUCKET-NAME]',
        Key='[OBJECT-KEY]',
        UploadId='[UPLOAD-ID]'
    )
    ```
  </Tab>
</Tabs>

## 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.

<Tabs>
  <Tab title="AWS CLI">
    This shell loop pages through `list-multipart-uploads` and aborts every upload it finds. Replace `[BUCKET-NAME]` with the name of your bucket.

    ```bash title="Abort all incomplete multipart uploads with AWS CLI" theme={"system"}
    BUCKET="[BUCKET-NAME]"

    aws s3api list-multipart-uploads --bucket "$BUCKET" \
        --query 'Uploads[].[Key, UploadId]' \
        --output text \
    | while read -r KEY UPLOAD_ID; do
        [ -z "$KEY" ] && continue
        aws s3api abort-multipart-upload \
            --bucket "$BUCKET" \
            --key "$KEY" \
            --upload-id "$UPLOAD_ID"
      done
    ```

    If the bucket has more than 1000 incomplete multipart uploads, run the loop again until `list-multipart-uploads` returns an empty response.
  </Tab>

  <Tab title="s3cmd">
    s3cmd does not have a built-in batch abort command. Use the AWS CLI tab or the Boto3 tab to abort uploads in bulk.
  </Tab>

  <Tab title="Boto3">
    This script paginates through every incomplete multipart upload in the bucket and aborts each one.

    ```python title="Abort all incomplete multipart uploads with Boto3" theme={"system"}
    import os
    import boto3
    from botocore.client import Config

    BUCKET = '[BUCKET-NAME]'

    boto_config = Config(
        region_name='US-EAST-04A',
        s3={'addressing_style': 'virtual'}
    )

    s3 = boto3.client(
        's3',
        endpoint_url='https://cwobject.com',
        aws_access_key_id=os.environ['ACCESS_KEY_ID'],
        aws_secret_access_key=os.environ['SECRET_ACCESS_KEY'],
        config=boto_config
    )

    aborted = 0
    paginator = s3.get_paginator('list_multipart_uploads')
    for page in paginator.paginate(Bucket=BUCKET):
        for upload in page.get('Uploads', []):
            s3.abort_multipart_upload(
                Bucket=BUCKET,
                Key=upload['Key'],
                UploadId=upload['UploadId'],
            )
            aborted += 1

    print(f"Aborted {aborted} incomplete multipart uploads in {BUCKET}.")
    ```
  </Tab>
</Tabs>

## Verify the bucket is clear

After aborting, re-run the [List incomplete multipart uploads](#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](/products/storage/object-storage/buckets/empty-and-delete-bucket) to finish the remaining cleanup steps.

## Prevent recurrence

Apply an [`AbortIncompleteMultipartUpload` lifecycle rule](/products/storage/object-storage/buckets/lifecycle-policies#common-configurations) 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](/products/storage/object-storage/buckets/lifecycle-policies): Automate cleanup of incomplete multipart uploads.
* [Empty and delete a bucket](/products/storage/object-storage/buckets/empty-and-delete-bucket): Full procedure for removing a bucket and its contents.
* [`s3:ListMultipartUploads`](/products/storage/object-storage/reference/object-storage-s3#s3listmultipartuploads): API reference.
* [`s3:AbortMultipartUpload`](/products/storage/object-storage/reference/object-storage-s3#s3abortmultipartupload): API reference.
