Completing a Multipart Upload

You can complete the multipart upload or one of the sub-parts to finalize the upload of an object to the specified bucket. The object is reconstituted when the multipart upload or the sub-part is complete.

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

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

Request sample
$ aws s3api complete-multipart-upload \
    --profile YOUR_PROFILE \
    --bucket BUCKET \
    --key MULTIPART_UPLOAD \
    --upload-id 2~xrosnH8pbKTk3sjXijfGIUN1KAEM3Yc \
    --multipart-upload Parts=[{ETag=c89bc55d61534a407e6ea376e0eedcc0\,PartNumber=1},{ETag=44c7af3f06fd63a36593826be3cb7684\,PartNumber=2}] \
    --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 complete the multipart upload or the sub-part.

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

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

  • (optional) multipart-upload: Information about the multipart upload. This element contains the following attributes you need to specify:

    • Parts: Information about the parts you uploaded. This element contains the following attributes you need to specify:

      • ETag: The ETag of the uploaded object.

      • PartNumber: The number of the part you specified. This number must be an integer between 1 and 10000.

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

The complete-multipart-upload command returns the following elements:

  • ETag: The ETag of the completed upload.

  • Bucket: The bucket in which the multipart upload was completed.

  • Location: The URI of the completed multipart upload accessible to the users you specified when creating the multipart upload.

  • Key: The name you specified when creating the multipart upload.

    Result Sample
    {
        "ETag": "\"0000a0f0a0faab7f00000ff0000f00d0-3\""
        "Bucket": BUCKET
        "Location": "https://<BUCKET>.<SERVICE>.<REGION>.outscale.com/<MULTIPART_UPLOAD>"
        "Key": MULTIPART_UPLOAD
    }

Related Pages

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