Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Cross account lakeformation tables in AWS

Aperta
#3,244 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Tranquilla
Stack tecnologico
aws, python
Ambito
cloud, databases

Direzione di ricerca

Inizia in pyiceberg/catalog/rest/init.py, in load_table(), quindi esamina pyiceberg/catalog/rest/response.py e il relativo percorso _handle_non_200_response. Riproduci la richiesta Lake Formation tra account utilizzando la configurazione e le autorizzazioni descritte nell’issue. Il lavoro è completato quando load_table() riesce ad accedere alla tabella tra account oppure quando la risposta 403 viene segnalata con la causa corretta.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
Python
Stelle
1.1k
Fork
589
Merge medio
2g 2h
PR unite (30g)
70

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/iceberg-python

Tutte le issue di apache/iceberg-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.