From 8fe3b09d21934fd3f2a76882fa8cfc626974907f Mon Sep 17 00:00:00 2001 From: Mayur Singal <39544459+ulixius9@users.noreply.github.com> Date: Thu, 15 Dec 2022 13:00:32 +0530 Subject: [PATCH] Add Support for Endpoint URL in Datalake (#9293) --- ingestion/src/metadata/clients/aws_client.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ingestion/src/metadata/clients/aws_client.py b/ingestion/src/metadata/clients/aws_client.py index fa9c3a17a35..1244f951278 100644 --- a/ingestion/src/metadata/clients/aws_client.py +++ b/ingestion/src/metadata/clients/aws_client.py @@ -73,6 +73,10 @@ class AWSClient: if self.config is not None: logger.info(f"Getting AWS client for service [{service_name}]") session = self._get_session() + if self.config.endPointURL is not None: + return session.client( + service_name=service_name, endpoint_url=self.config.endPointURL + ) return session.client(service_name=service_name) logger.info(f"Getting AWS default client for service [{service_name}]") @@ -81,6 +85,10 @@ class AWSClient: def get_resource(self, service_name: str) -> Any: session = self._get_session() + if self.config.endPointURL is not None: + return session.resource( + service_name=service_name, endpoint_url=self.config.endPointURL + ) return session.resource(service_name=service_name) def get_dynamo_client(self) -> DynamoClient: