You can return to the original look by selecting English in the language selector
above.

Upload Part (PUT uploadID)

Description

This multipart upload operation uploads a part of an archive. You can upload archive
parts
in any order because in your Upload Part request you specify the range of bytes
in the
assembled archive that will be uploaded in this part. You can also upload these
parts in
parallel. You can upload up to 10,000 parts for a multipart upload.

Amazon S3 Glacier (Glacier) rejects your upload part request if any of the following
conditions is
true:

SHA256 tree hash does not match—To ensure that part
data is not corrupted in transmission, you compute a SHA256 tree hash of the
part and include it in your request. Upon receiving the part data, Glacier
also computes a SHA256 tree hash. If the two hash values don't match, the
operation fails. For information about computing a SHA256 tree hash, see
Computing Checksums.

SHA256 linear hash does not match—Required for
authorization, you compute a SHA256 linear hash of the entire uploaded payload
and include it in your request.
For information about computing a SHA256 linear hash, see
Computing Checksums.

Part size does not match—The size of each part except the last must match the size that is specified in the
corresponding Initiate Multipart Upload (POST
multipart-uploads) request. The size of the last part must
be the same size as, or smaller than, the specified size.

Note

If you upload a part whose size is smaller than the part size you specified in your
initiate
multipart upload request and that part is not the last part, then the
upload part request will succeed. However, the subsequent Complete
Multipart Upload request will fail.

Range does not align—The byte range value in the
request does not align with the part size specified in the corresponding
initiate request. For example, if you specify a part size of 4194304 bytes
(4 MB), then 0 to 4194303 bytes (4 MB —1) and 4194304 (4 MB) to
8388607 (8 MB —1) are valid part ranges. However, if you set a range
value of 2 MB to 6 MB, the range does not align with the part size and the
upload will fail.

This operation is idempotent. If you upload the same part multiple times, the data
included
in the most recent request overwrites the previously uploaded data.

Requests

You send this HTTP PUT request to the URI of the upload ID that was returned by
your Initiate Multipart Upload request. Glacier uses the upload ID to associate
part uploads with a specific multipart upload. The request must include a SHA256
tree
hash of the part data (x-amz-SHA256-tree-hash header), a SHA256 linear hash of the entire payload (x-amz-content-sha256 header),
the byte range (Content-Range header), and the length of the part in bytes (Content-Length header).

The AccountId value is the AWS account ID of the account that owns the vault. You can either specify
an AWS account ID or optionally a single '-' (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with
the credentials used to sign the request. If you use an account ID, do not include
any hyphens ('-') in the ID.

Request Parameters

This operation does not use request parameters.

Request Headers

This operation uses the following request headers, in addition to the request headers
that are common to all operations.
For more information about the common request headers, see
Common Request Headers.

Name

Description

Required

Content-Length

Identifies the length of the part in bytes.

Type: String

Default: None

Constraints: None

No

Content-Range

Identifies the range of bytes in the assembled archive that will be uploaded in
this part. Glacier uses this information to assemble the
archive in the proper sequence. The format of this header
follows RFC
2616. An example header is Content-Range:bytes
0-4194303/*.

Type: String

Default: None

Constraints: The range cannot be greater than the part size that you specified
when you initiated the multipart upload.

Yes

x-amz-content-sha256

The SHA256 checksum (a linear hash) of the uploaded payload.
This is not the same value as you specify in the
x-amz-sha256-tree-hash header.

Type: String

Default: None

Constraints: None

Yes

x-amz-sha256-tree-hash​

Specifies a SHA256 tree hash of the data being uploaded. For information about
computing a SHA256 tree
hash,
see Computing Checksums.

Type: String

Default: None

Constraints: None

Yes

Request Body

The request body contains the data to upload.

Responses

Upon a successful part upload, Glacier returns a 204 No Content
response.

Syntax

Response Headers

A successful response includes the following response headers, in addition to the
response headers that are common to all operations. For more information about common
response headers, see
Common Response Headers.

Name

Description

x-amz-sha256-tree-hash​

The SHA256 tree hash that Glacier computed for the uploaded part.

Type: String

Response Body

This operation does not return a response body.

Example

The following request uploads a 4 MB part. The request sets the byte range to make
this the
first part in the archive.

Example Request

The example sends an HTTP PUT request to upload a 4 MB part. The request is
sent to the URI of the Upload ID that was returned by the Initiate Multipart Upload
request. The Content-Range header identifies the part as the first 4 MB
data part of the archive.

To upload the next part, the procedure is the same; however, you must calculate a
new
SHA256 tree hash of the part you are uploading and also specify a new byte range
to
indicate where the part will go in the final assembly. The following request uploads
another part using the same upload ID. The request specifies the next 4 MB of
the
archive after the previous request and a part size of 4 MB.