TECHNOLOGY

Separate multipart upload completion from individual parts

In this article
THE QUICK TAKE

Treat multipart part success and final assembly separately, and read the complete S3 completion result before publishing an artifact-ready state.

All checkpoint parts uploaded successfully, but no complete object is ready for readers. Multipart upload has a separate completion operation with its own result. For direct Amazon S3 API clients, even an initial successful HTTP response header does not establish final completion: the documented response body can still contain an error while assembly is being processed.

Preserve the upload identity

Keep bucket, key, upload identifier and accepted source revision together. Parts from different upload attempts are not one interchangeable set. A retry that creates another upload identifier must maintain separate state. Preserve the intended part sequence and validated content before asking the service to assemble the final object, rather than deriving package completeness from the number of successful worker tasks alone.

Retain each part result

The completion request identifies parts with their part numbers and returned entity tags under the documented contract. Preserve those exact results and the applicable checksum context. A successful part upload confirms that part operation, not final object publication. Replacing a part within an attempt also requires updating the accepted completion state rather than reusing an older recorded result for the same number.

Read the complete outcome

CompleteMultipartUpload can send initial success headers while processing continues and later include an error in the response body. A direct client must parse the complete service result. Official SDKs document handling this condition through their error machinery, but the application must still observe the final SDK outcome. Do not mark the artifact ready at header receipt or when a progress connection remains open.

Reconcile uncertain completion

If the final response is lost, retain the upload attempt and intended artifact identity while determining the supported recovery action. A transport timeout alone does not prove whether object creation failed. Blindly publishing a local ready marker from a part-success list bypasses the unresolved completion decision. Likewise, unbounded creation of new attempts can leave unused multipart state that needs the workflow’s explicit cleanup policy.

Verify publication for readers

After successful completion, establish the accepted object identity, length and integrity before inserting it into the model’s release manifest. Test final-body error and uncertain-response paths in an isolated client harness. A useful result distinguishes parts, assembly and accepted publication. It does not make a collection of uploaded parts a coherent model release or establish readiness of workers that have not yet downloaded and validated the completed object.

Primary references

Amazon S3 Multipart Completion Result.

Amazon S3 UploadPart Identity.

Amazon S3 Multipart Upload Lifecycle.

Related reading: Init container downloads an artifact again: making preparation idempotent; Keep tokenizer vocabulary, special tokens and chat templates in one release.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles