#17013·minio

Checksum after CopyObject works differently from aws S3

Author: adam-kiss-sgCreated Apr 11, 2023Updated Oct 31, 2025
Labelspriority: lowcommunitydo-not-closetriage

Expected Behavior

On aws s3, after calling CopyObject, the checksum of the resulting object is the "real" checksum (eg: the sha256 checksum of the full file).

Current Behavior

On minio, after a CopyObject the checksum stays the same. If the original object was uploaded using multipart upload, then the chekcum of the copy will be the combined checksum of the upload parts.

Steps to Reproduce (for bugs)

  1. Create an object with multipart upload, with ChecksumAlgorithm: ChecksumAlgorithm.SHA256.
  2. Copy the object using CopyObject command.
  3. Check the resulting sha256 checksum using HeadObject command with ChecksumMode: ChecksumMode.ENABLED

Context

Please see: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html

Because of how Amazon S3 calculates the checksum for multipart objects, the checksum value for the object might change if you copy it. If you're using an SDK or the REST API and you call CopyObject, Amazon S3 copies any object up to the size limitations of the CopyObject API operation. Amazon S3 does this copy as a single action, regardless of whether the object was uploaded in a single request or as part of a multipart upload. With a copy command, the checksum of the object is a direct checksum of the full object. If the object was originally uploaded using a multipart upload, then the checksum value changes even though the data has not.

Regression

No (at least I don't think so).

Your Environment

Using latest docker image from quay.io/minio/minio

MinIO Object Storage Server
Copyright: 2015-2023 MinIO, Inc.
License: GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>
Version: RELEASE.2023-04-07T05-28-58Z (go1.20.3 linux/amd64)