-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Support the cross-account access using IAM role for S3 PinotFS #10009
Conversation
When accountA tries to access data in S3 bucket owned by accountB, AWS provides a way to establish the access to the S3 bucket using cross-account IAM role. This approach is preferred in some cases because `accountKey, secretKey` doesn't need to be exposed. https://repost.aws/knowledge-center/cross-account-access-s3
This is a bit complex to add the test because it involves in multiple AWS accounts to try out. I have tested this locally using 2 different AWS accounts and the IAM role based access was successfully established. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comments. lgtm!
...ns/pinot-file-system/pinot-s3/src/main/java/org/apache/pinot/plugin/filesystem/S3Config.java
Outdated
Show resolved
Hide resolved
...s/pinot-file-system/pinot-s3/src/main/java/org/apache/pinot/plugin/filesystem/S3PinotFS.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #10009 +/- ##
=============================================
+ Coverage 25.06% 70.40% +45.33%
- Complexity 44 5681 +5637
=============================================
Files 1979 1992 +13
Lines 106930 107324 +394
Branches 16277 16318 +41
=============================================
+ Hits 26800 75558 +48758
+ Misses 77405 26494 -50911
- Partials 2725 5272 +2547
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
4cbfe76
to
447e823
Compare
Yeah, I also haven't figured out how to write a test for this. I tried doing it via Localstack once but it has some bugs with mock IAM due to which the access doesn't work properly if you create multiple accounts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for moving the S3Config to a seperate class.
DM-404
When accountA tries to access data in S3 bucket owned by accountB, AWS provides a way to establish the access to the S3 bucket using cross-account IAM role. This approach is preferred in some cases because
accountKey, secretKey
doesn't need to be exposed.https://repost.aws/knowledge-center/cross-account-access-s3