Taragolis commented on code in PR #28545:
URL: https://github.com/apache/airflow/pull/28545#discussion_r1055917750


##########
airflow/providers/amazon/aws/hooks/base_aws.py:
##########
@@ -754,7 +754,9 @@ def test_connection(self):
         """
         try:
             session = self.get_session()
-            conn_info = session.client("sts").get_caller_identity()
+            conn_info = session.client(
+                "sts", endpoint_url=self.conn_config.endpoint_url
+            ).get_caller_identity()

Review Comment:
   In case if custom endpoint set in connection then this connection only would 
work with STS API, otherwise it will raise an error and vice versa if user 
provide something like `https://elasticmapreduce.eu-west-1.amazonaws.com` then 
connection test will fail
   
   Unfortunetly this is a limitation of current implementation: only one 
endpoint for connection.
   
   So this should be fixed on connection level, for example add ability provide 
endpoint on service level with some backward compatibility
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to