Completing a Multipart Upload

In the case of a multipart upload, you must perform an action to complete the upload of the object.

Completing a Multipart Upload Using AWS CLI

Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring 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 file://path/to/configuration/file \
    --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.

  • key: The name given to the multipart upload you want to complete.

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

  • multipart-upload: The path to the JSON configuration file containing details about the parts you want to reassemble into one object. For more information on how to write this file, see Multipart Upload Configuration Reference.

  • endpoint: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.

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

  • Location: The URI of the completed multipart upload (containing your reassembled object), accessible to the users you specified when creating the multipart upload.

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

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

  • ETag: The ETag of the completed multipart upload.

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

If you encounter an HTTP status code 403 when accessing the provided URI, you need to configure a public-read ACL on your reassembled object. For more information, see Configuring an Object ACL.

Related Pages

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