upload-part

Prev Next

Available in Classic and VPC

Upload a part of a multipart upload. To upload, you must first run create-multipart-upload to generate a multipart upload ID.

Note

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

Syntax

The upload-part syntax is as follows:

aws s3api upload-part \
    --bucket <bucket> \
    --key <key> \
    --part-number <part-number> \
    --upload-id <upload-id> \
    [--body <body>] \
    [--content-length <content-length>] \
    [--content-md5 <content-md5>] \
    [--sse-customer-algorithm <sse-customer-algorithm>] \
    [--sse-customer-key <sse-customer-key>] \
    [--sse-customer-key-md5 <sse-customer-key-md5>] \
    --endpoint-url <endpoint-url>
Note

The maximum size that can be uploaded to Ncloud Storage is 5 TiB, and the size of each part that can be uploaded is between 5 MiB and 5 GiB. (There is no minimum size limit for the last part of a multipart upload.)
Up to 10,000 parts can be created for a multipart upload.

Options

This section describes the options available when running upload-part.

Required options

The following options are required for upload-part.

Options Type Required Description
--bucket String Required Bucket name
--key String Required Object name
--part-number Integer Required Number of the part being uploaded
  • The number of parts can range from 1 to 10,000.
--upload-id String Required Multipart upload ID

Optional options

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

Options Type Required Description
--body String Optional Path or file of the object
--content-length Long Optional Request data size (byte)
--content-md5 String Optional Base64-encoded 128-bit MD5 hash of the request data
  • Used to validate the integrity of the request data
  • Calculated automatically if not entered
--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 part upload request is successful, the part's identification information and encryption information are returned.

Command

The command example is as follows:

aws s3api upload-part --bucket my-test-bucket \
    --key large.bin \
    --part-number 1 \
    --body part-aa \
    --upload-id {upload_id} \
    --endpoint-url=https://kr.ncloudstorage.com

Output

The output example is as follows:

{
    "ServerSideEncryption": "AES256",
    "ETag": "\"6d5a86df9e8a0385daf367791d291c94\"",
    "ChecksumCRC32": "NNH2hvw0M94="
}

Related commands

Related commands are as follows: