Initiate the multipart upload with CreateMultipartUpload for the target bucket and key; capture the UploadId from the response.
Split the file into parts of at least 5 MB each (except the final part); upload each part using UploadPart, supplying the UploadId and a sequential PartNumber starting at 1.
Collect the ETag header returned by each UploadPart response along with its PartNumber.
Once all parts are uploaded, call CompleteMultipartUpload with the UploadId and the ordered list of {PartNumber, ETag} objects.
Verify the object exists and has the correct size via HeadObject on the final key.
If the process fails, call AbortMultipartUpload to avoid storage charges for incomplete parts.
Known gotchas
Parts must be at least 5 MB except for the final part; uploading smaller parts (other than the last) results in an EntityTooSmall error on CompleteMultipartUpload.
ETags from UploadPart may be quoted strings; store them exactly as returned including any quotes, as the complete request validates them.
Incomplete multipart uploads accrue storage charges; configure an S3 lifecycle rule to automatically abort incomplete uploads after a defined number of days.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp