Closed
Description
Feature Request / Improvement
Background
Glue catalogs allows to setup access credentials when creating boto3.Session. Unfortunately, REST Catalog is able to use default session only in class SigV4Adapter(HTTPAdapter):.
Ideally exactly the same mechanism could be used here (OFC with constants renamed)
session = boto3.Session(
profile_name=properties.get(GLUE_PROFILE_NAME),
region_name=get_first_property_value(properties, GLUE_REGION, AWS_REGION),
botocore_session=properties.get(BOTOCORE_SESSION),
aws_access_key_id=get_first_property_value(properties, GLUE_ACCESS_KEY_ID, AWS_ACCESS_KEY_ID),
aws_secret_access_key=get_first_property_value(properties, GLUE_SECRET_ACCESS_KEY, AWS_SECRET_ACCESS_KEY),
aws_session_token=get_first_property_value(properties, GLUE_SESSION_TOKEN, AWS_SESSION_TOKEN),
)Implementation
I'm happy to implement the change. I have it working locally. I can also remove some of the code duplication (FileIO also creates boto session - it looks as above)
Pls tell me if you are interested in PR
Reacted by Charles
Metadata
Metadata
Assignees
Labels
No labels
Activity
potatochipcoconut commentedon May 17, 2025
@rudolfix what's the implication of how it currently works? because I am seeing some weird iam errors when writing data in sometimes w/lambda, not sure if related.
rudolfix commentedon May 18, 2025
I can't easily configure S3 Table access credentials - I have to provide default AWS profile in
.awsor AWS env variables. If that is not done then I get this:we use
pyicebergfrom our library (dlt) where many configurations should coexist as the same time and such "hardcoded" session makes that harderYangKian commentedon Jun 5, 2025
Hello!
We're encountering the same issue using PyIceberg to access AWS S3 tables with the AWS S3 Table REST Catalog. Our use case involves multiple clients accessing different S3 tables concurrently, so we need PyIceberg to support dynamically specifying credentials in code.
YangKian commentedon Jun 6, 2025
Hi @rudolfix , just wonder do you still have plans to implement this change?
rudolfix commentedon Jun 9, 2025
looks like it is implemented here: #2071 and this exactly what I planned to do!
Robustify boto3 session handling (DynamoDB, RestCatalog) (apache#2071)
Robustify boto3 session handling (DynamoDB, RestCatalog) (apache#2071)
Robustify boto3 session handling (DynamoDB, RestCatalog) (apache#2071)