Cross account lakeformation tables in AWS
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
調査の方向性
pyiceberg/catalog/rest/init.py の load_table() から始め、次に pyiceberg/catalog/rest/response.py とその _handle_non_200_response パスを調べます。issue に記載された設定と権限を使用して、クロスアカウントの Lake Formation リクエストを再現します。load_table() でクロスアカウントのテーブルに正常にアクセスできるか、403 レスポンスが正しい原因とともに報告されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Apache Iceberg version
0.11.1
Please describe the bug 🐞
We have our datalake that is apache iceberg format that is governed by lakeformation (account A). We have various other AWS accounts that are trying to read in a lambda using pyiceberg.
All boto3 calls to fetch the data work correctly, to me verifying that the IAM permissions and Lake formation permissions are correct. Additionally boto3 athena calls are successful. However when pyiceberg, it fails with the following error:
[ERROR] ForbiddenError: RESTError 403: Received unexpected JSON Payload: { "error": { "code": 403, "type": "AccessDeniedException" } } , errors: Field required Traceback (most recent call last): File "/var/task/lambda_function.py", line 38, in lambda_handler results = fetch_dataset() File "/var/task/lambda_function.py", line 64, in fetch_dataset table = catalog.load_table("curated_sales_and_policy.ods_agent") File "/opt/python/lib/python3.13/site-packages/tenacity/__init__.py", line 331, in wrapped_f return copy(f, *args, **kw) File "/opt/python/lib/python3.13/site-packages/tenacity/__init__.py", line 470, in __call__ do = self.iter(retry_state=retry_state) File "/opt/python/lib/python3.13/site-packages/tenacity/__init__.py", line 371, in iter result = action(retry_state) File "/opt/python/lib/python3.13/site-packages/tenacity/__init__.py", line 393, in <lambda> self._add_action_func(lambda rs: rs.outcome.result()) File "/var/lang/lib/python3.13/concurrent/futures/_base.py", line 449, in result return self.__get_result() File "/var/lang/lib/python3.13/concurrent/futures/_base.py", line 401, in __get_result raise self._exception File "/opt/python/lib/python3.13/site-packages/tenacity/__init__.py", line 473, in __call__ result = fn(*args, **kwargs) File "/opt/python/lib/python3.13/site-packages/pyiceberg/catalog/rest/__init__.py", line 921, in load_table _handle_non_200_response(exc, {404: NoSuchTableError}) File "/opt/python/lib/python3.13/site-packages/pyiceberg/catalog/rest/response.py", line 111, in _handle_non_200_response raise exception(response) from exc
here is the relevant piece of code:
` catalog = load_catalog(
"glue_rest",
**{
"type": "rest",
"uri": "https://glue.us-east-2.amazonaws.com/iceberg",
"warehouse": "account_A_account_number",
"rest.sigv4-enabled": "true",
"rest.signing-region": "us-east-2",
"rest.signing-name": "glue",
}
)
table = catalog.load_table("database1.table1")`
here is our settings:
AccountA:
- lakeformation describe on Database
- lakeformation describe, select on relevant tables
- have a proper data location access resource create in lakeformation granting the execution role the appropriate access
AccountB:
- lambda execution role has glue:* and lakeformation:GetDataAccess
Just to note, the catalog is created successfully and doesn't throw an error, but it does when we specifically on load_table()
I've tried troubleshooting by playing with the headers being sent and messing with the header value sig4-enabled. Nothing seems to work.
Does anyone have a working example and the configuration you are using? Is this support with the current version (we are on latest 0.11.1).
Any help would be appreciated. I can provide additional information if needed.
Willingness to contribute
- I can contribute a fix for this bug independently
- I would be willing to contribute a fix for this bug with guidance from the Iceberg community
- I cannot contribute a fix for this bug at this time
- 主要言語
- Python
- スター
- 1.1k
- フォーク
- 589
- 平均マージ
- 2日 2時間
- マージ済み PR(30日)
- 70
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/iceberg-python のほかの issue
-
kind:bug
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
apache/iceberg-python#4006 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/iceberg-python#3996 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/iceberg-python#3979 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/iceberg-python#3885 ·
-
[Bug] PyArrowFileIO fails to propagate s3.ssl.ca-cert to pyarrow.fs.S3FileSystem tls_ca_file_path オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
apache/iceberg-python#3866 · コメント 1 件 ·
apache/iceberg-python の issue をすべて見る
似ている issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
canonical/paas-charm#368 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
tech debt
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
StevenBlack/hosts#3256 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
qualcomm/qai-appbuilder#275 ·