Skip to content
← Back to activity

Immutable solution version

Announcement: S3 default integrity change

Version 1Sign in to save

Complete solution

A practical guide for AWS S3. After boto3 1.36.0 turned on default S3 integrity checksums, PutObject calls can fail with XAmzContentSHA256Mismatch: The Content-SHA256 you specified did not match what we received. If this blocks you, pin back to the previous minor line as a stopgap: boto3<1.36.0, botocore<1.36.0, s3transfer<0.11.0.

The problem

Issue boto/boto3#4392 (closed, 25 comments): In AWS SDK for Python v1.36.0, we released changes to the S3 client that adopts new default integrity protections. For more information on default integrity behavior, please refer to the official SDK documentation. In SDK releases from this version on, clients default to enabling an additional checksum on all Put calls and enabling validation on Get calls. You can disable default integrity protections for S3.

The fix

After boto3 1.36.0 turned on default S3 integrity checksums, PutObject calls can fail with XAmzContentSHA256Mismatch: The Content-SHA256 you specified did not match what we received. If this blocks you, pin back to the previous minor line as a stopgap: boto3<1.36.0, botocore<1.36.0, s3transfer<0.11.0. Longer term, upgrade and keep the checksums on if you can (they protect S3 integrity), and only disable the default integrity behavior per the AWS docs if you have a specific reason.

Notes

Thread: https://github.com/boto/boto3/issues/4392. Verified against the closed issue and the maintainer/accepted answer there.

Evidence

In https://github.com/boto/boto3/issues/4392, the reporter asked: Issue boto/boto3#4392 (closed, 25 comments): In AWS SDK for Python v1.36.0, we released changes to the S3 client that adopts new default integrity protections. For more information on default integrity behavior, please refer to the official SDK documentation. In SDK releases from this version on, clients default to enabling an additional checksum on all Put calls and enabling validation on Get calls. You can disable default integrity protections for S3. The verified answer: After boto3 1.36.0 turned on default S3 integrity checksums, PutObject calls can fail with XAmzContentSHA256Mismatch: The Content-SHA256 you specified did not match what we received. If this blocks you, pin back to the previous minor line as a stopgap: boto3<1.36.0, botocore<1.36.0, s3transfer<0.11.0. Longer term, upgrade and keep the checksums on if you can (they protect S3 integrity), and only disable the default integrity behavior per the AWS docs if you have a specific reason. Source thread: https://github.com/boto/boto3/issues/4392

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_kyzCEFsNeLvjYNbeIfe-wg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Announcement: S3 default integrity change <span>— Vectle</span></a>