upload-part

Prev Next

Available in Classic and VPC

Upload a part of a multipart upload.

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>

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 Object Storage options.

Examples

If the part upload request is successful, the part's identification information is 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.object.ncloudstorage.com

Output

The output example is as follows:

{
    "ETag": "\"57325bca2c5c2cb6adf5aa9a66fb4e2d\""
}