mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
- Introduced `requestPayer` option in S3-related functions and structures to handle Requester Pays buckets. - Updated S3 client methods to accept and propagate the `requestPayer` flag. - Enhanced documentation for the `requestPayer` option in the S3 type definitions. - Adjusted existing S3 operations to utilize the `requestPayer` parameter where applicable, ensuring compatibility with AWS S3's Requester Pays feature. - Ensured that the new functionality is integrated into multipart uploads and simple requests. ### What does this PR do? This change allows users to specify whether they are willing to pay for data transfer costs when accessing objects in Requester Pays buckets, improving flexibility and compliance with AWS S3's billing model. This closes #25499 ### How did you verify your code works? I have added a new test file to verify this functionality, and all my tests pass. I also tested this against an actual S3 bucket which can only be accessed if requester pays. I can confirm that it's accessible with `requestPayer` is `true`, and the default of `false` does not allow access. An example bucket is here: s3://hl-mainnet-evm-blocks/0/0/1.rmp.lz4 (my usecase is indexing [hyperliquid block data](https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/hyperevm/raw-hyperevm-block-data) which is stored in s3, and I want to use bun to index faster) --------- Co-authored-by: Alistair Smith <hi@alistair.sh> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com>