Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix aws-sdk-js-v3 code example for version 3.729.0 or later #19236

Closed
wants to merge 1 commit into from

Conversation

NGPixel
Copy link

@NGPixel NGPixel commented Jan 16, 2025

Summary

The latest release of @aws-sdk/client-s3 (3.729.0) introduced a breaking change with R2. Many commands, such as PutObject are now failing with error 501: NotImplemented: Header 'x-amz-checksum-crc32' with value (***) not implemented because AWS is now enforcing checksums.

The workaround is to set the requestChecksumCalculation and responseChecksumValidation properties to WHEN_REQUIRED when initializing the client.

It would be best if Cloudflare could support this new header as there's no telling how long AWS will allow this setting to be disabled.

See aws/aws-sdk-js-v3#6810 for more info.

Documentation checklist

@NGPixel NGPixel requested review from Oxyjun, elithrar, jonesphillip and a team as code owners January 16, 2025 05:01
@github-actions github-actions bot added size/xs product:r2 R2 object storage: https://developers.cloudflare.com/r2 labels Jan 16, 2025
CloudPassenger added a commit to CloudPassenger/lobe-chat that referenced this pull request Jan 16, 2025
arvinxx added a commit to lobehub/lobe-chat that referenced this pull request Jan 17, 2025
#5479)

* 🐛 fix: S3 client integrity check for Cloudflare R2

related issues:
cloudflare/cloudflare-docs#19236
aws/aws-sdk-js-v3#6810

* Update index.ts

---------

Co-authored-by: Arvin Xu <[email protected]>
gecsp pushed a commit to gecsp/lobe-chat that referenced this pull request Jan 22, 2025
lobehub#5479)

* 🐛 fix: S3 client integrity check for Cloudflare R2

related issues:
cloudflare/cloudflare-docs#19236
aws/aws-sdk-js-v3#6810

* Update index.ts

---------

Co-authored-by: Arvin Xu <[email protected]>
@Oxyjun
Copy link
Contributor

Oxyjun commented Jan 23, 2025

Thanks for opening this PR!

As an update: this information has been added to all applicable pages in a separate PR, so I'll close this PR for now. 😄

@Oxyjun Oxyjun closed this Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product:r2 R2 object storage: https://developers.cloudflare.com/r2 size/xs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants