feat: Add S3 access point support for cross-account table access#2994
Open
JannicCutura wants to merge 2 commits intoapache:mainfrom
Open
feat: Add S3 access point support for cross-account table access#2994JannicCutura wants to merge 2 commits intoapache:mainfrom
JannicCutura wants to merge 2 commits intoapache:mainfrom
Conversation
d49ea63 to
17cd113
Compare
Add support for accessing Iceberg tables via S3 access points, enabling cross-account access scenarios where organizations enforce access point usage instead of direct bucket access. Changes: - Add S3_ACCESS_POINT_PREFIX config constant (s3.access-point.<bucket>) - Implement _resolve_s3_access_point() in PyArrowFileIO - Implement _resolve_s3_access_point() in FsspecFileIO - Add 12 unit tests (6 per FileIO implementation) Configuration: s3.access-point.<bucket-name> = <access-point-alias> The access point alias (format: <name>-<account-id>-s3alias) is used transparently in place of the bucket name when accessing S3 objects.
17cd113 to
dcff1ac
Compare
…tion The _resolve_s3_access_point method was incorrectly constructing paths for non-S3 schemes (like local files) by concatenating netloc and path_suffix. This caused issues when local paths had double slashes (e.g., //tmp/...) because urlparse interprets these as network paths with netloc. Now the method takes the original path from parse_location as a parameter and returns it unchanged for non-S3 schemes, ensuring local file operations work correctly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
Add support for accessing Iceberg tables via S3 access points, enabling cross-account access scenarios where organizations enforce access point usage instead of direct bucket access. Closes #2991.
I created this PR based on the contribution guide, but it is my first PR on an open source repo, so apologies in advance should I have missed any step.
Changes:
Configuration:
for example:
What
The access point alias (format: --s3alias) is used transparently in place of the bucket name when accessing S3 objects.
Why
Organizations increasingly enforce S3 access point usage for cross-account
data access instead of direct bucket access. This is common in enterprise
environments with strict security policies.
How
Introduces
s3.access-point.<bucket>configuration that maps bucket namesto access point aliases. Both PyArrowFileIO and FsspecFileIO resolve these
at runtime, rewriting paths transparently.
Are these changes tested?
Yes.
Are there any user-facing changes?
No breaking changes. Existing configurations continue to work unchanged.
There is a new configuration option
s3.access-point.<bucket-name>