diff --git a/pyiceberg/catalog/dynamodb.py b/pyiceberg/catalog/dynamodb.py index 4c38bb5cf6..b999df218a 100644 --- a/pyiceberg/catalog/dynamodb.py +++ b/pyiceberg/catalog/dynamodb.py @@ -96,7 +96,7 @@ def __init__(self, name: str, **properties: str): super().__init__(name, **properties) session = boto3.Session( - profile_name=get_first_property_value(properties, DYNAMODB_PROFILE_NAME), + profile_name=properties.get(DYNAMODB_PROFILE_NAME), region_name=get_first_property_value(properties, DYNAMODB_REGION, AWS_REGION), aws_access_key_id=get_first_property_value(properties, DYNAMODB_ACCESS_KEY_ID, AWS_ACCESS_KEY_ID), aws_secret_access_key=get_first_property_value(properties, DYNAMODB_SECRET_ACCESS_KEY, AWS_SECRET_ACCESS_KEY), diff --git a/pyiceberg/catalog/glue.py b/pyiceberg/catalog/glue.py index cd949de075..758d66a36e 100644 --- a/pyiceberg/catalog/glue.py +++ b/pyiceberg/catalog/glue.py @@ -297,7 +297,7 @@ def __init__(self, name: str, **properties: Any): super().__init__(name, **properties) session = boto3.Session( - profile_name=get_first_property_value(properties, GLUE_PROFILE_NAME), + profile_name=properties.get(GLUE_PROFILE_NAME), region_name=get_first_property_value(properties, GLUE_REGION, AWS_REGION), 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),