|
30 | 30 | import boto3 |
31 | 31 |
|
32 | 32 | from pyiceberg.catalog import ( |
33 | | - DEPRECATED_ACCESS_KEY_ID, |
34 | | - DEPRECATED_BOTOCORE_SESSION, |
35 | | - DEPRECATED_PROFILE_NAME, |
36 | | - DEPRECATED_REGION, |
37 | | - DEPRECATED_SECRET_ACCESS_KEY, |
38 | | - DEPRECATED_SESSION_TOKEN, |
39 | 33 | ICEBERG, |
40 | 34 | METADATA_LOCATION, |
41 | 35 | PREVIOUS_METADATA_LOCATION, |
@@ -102,18 +96,11 @@ def __init__(self, name: str, **properties: str): |
102 | 96 | super().__init__(name, **properties) |
103 | 97 |
|
104 | 98 | session = boto3.Session( |
105 | | - profile_name=get_first_property_value(properties, DYNAMODB_PROFILE_NAME, DEPRECATED_PROFILE_NAME), |
106 | | - region_name=get_first_property_value(properties, DYNAMODB_REGION, AWS_REGION, DEPRECATED_REGION), |
107 | | - botocore_session=properties.get(DEPRECATED_BOTOCORE_SESSION), |
108 | | - aws_access_key_id=get_first_property_value( |
109 | | - properties, DYNAMODB_ACCESS_KEY_ID, AWS_ACCESS_KEY_ID, DEPRECATED_ACCESS_KEY_ID |
110 | | - ), |
111 | | - aws_secret_access_key=get_first_property_value( |
112 | | - properties, DYNAMODB_SECRET_ACCESS_KEY, AWS_SECRET_ACCESS_KEY, DEPRECATED_SECRET_ACCESS_KEY |
113 | | - ), |
114 | | - aws_session_token=get_first_property_value( |
115 | | - properties, DYNAMODB_SESSION_TOKEN, AWS_SESSION_TOKEN, DEPRECATED_SESSION_TOKEN |
116 | | - ), |
| 99 | + profile_name=get_first_property_value(properties, DYNAMODB_PROFILE_NAME), |
| 100 | + region_name=get_first_property_value(properties, DYNAMODB_REGION, AWS_REGION), |
| 101 | + aws_access_key_id=get_first_property_value(properties, DYNAMODB_ACCESS_KEY_ID, AWS_ACCESS_KEY_ID), |
| 102 | + aws_secret_access_key=get_first_property_value(properties, DYNAMODB_SECRET_ACCESS_KEY, AWS_SECRET_ACCESS_KEY), |
| 103 | + aws_session_token=get_first_property_value(properties, DYNAMODB_SESSION_TOKEN, AWS_SESSION_TOKEN), |
117 | 104 | ) |
118 | 105 | self.dynamodb = session.client(DYNAMODB_CLIENT) |
119 | 106 | self.dynamodb_table_name = self.properties.get(DYNAMODB_TABLE_NAME, DYNAMODB_TABLE_NAME_DEFAULT) |
|
0 commit comments