complete-multipart-upload

Prev Next

Available in Classic and VPC

Combine the uploaded parts to save the object and complete the multipart upload.

Note

For a Sub Account user to execute this command, they must have the Change/PutObject action permission.

Syntax

The complete-multipart-upload syntax is as follows:

aws s3api complete-multipart-upload \
    --bucket <bucket> \
    --key <key> \
    --upload-id <upload-id> \
    --multipart-upload <multipart-upload> \
    [--mpu-object-size <mpu-object-size>] \
    [--sse-customer-algorithm <sse-customer-algorithm>] \
    [--sse-customer-key <sse-customer-key>] \
    [--sse-customer-key-md5 <sse-customer-key-md5>] \
    --endpoint-url <endpoint-url>

Options

This section describes the options available when running complete-multipart-upload.

Required options

The following options are required for complete-multipart-upload.

Options Type Required Description
--bucket String Required Bucket name
--key String Required Object name
--upload-id String Required Multipart upload ID
--multipart-upload String Required List of parts to be combined

--multipart-upload syntax

  • Shorthand syntax
Parts=[{ETag=string, PartNumber=integer},{ETag=string, PartNumber=integer}]
  • JSON syntax
{
  "Parts": [
    {
      "ETag": "string",
      "PartNumber": integer
    }
    ...
  ]
}

Optional options

These are the optional options for complete-multipart-upload. Options that are not specified will use their default values.

Options Type Required Description
--mpu-object-size Long Optional Expected total object size for the multipart upload request
  • If the specified object size differs from the actual size, an HTTP 400 InvalidRequest error occurs.
--sse-customer-algorithm String Optional User encryption algorithm (AES256)
--sse-customer-key String Optional User-provided encryption key
--sse-customer-key-md5 String Optional User-provided encryption key's MD5 value

Common options

For information about the options common to all aws subcommands, see Ncloud Storage options.

Examples

If the request to complete a multipart upload is successful, the identification information and location information for the created object are returned.

Command

The command example is as follows:

aws s3api complete-multipart-upload --bucket my-test-bucket \
    --key large.bin \
    --upload-id {upload_id} \
    --multipart-upload file://mpu.json \
    --endpoint-url=https://kr.ncloudstorage.com

Output

The output example is as follows:

{
    "ServerSideEncryption": "AES256",
    "Location": "/my-test-bucket/large.bin",
    "Bucket": "my-test-bucket",
    "Key": "large.bin",
    "ETag": "\"12d25956f6cd793eef966af402c1d997-2\"",
    "ChecksumCRC64NVME": "okLxzQM8i2M=",
    "ChecksumType": "FULL_OBJECT"
}

Related commands

Related commands are as follows: