Skip to content

Allow to pass botocore session to REST Catalog (S3 Tables) like Glue Catalog does #2008

@rudolfix

Description

@rudolfix

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions