ramitkataria commented on code in PR #77419:
URL: https://github.com/apache/airflow/pull/77419#discussion_r4672840970


##########
providers/amazon/src/airflow/providers/amazon/aws/hooks/eks.py:
##########
@@ -674,7 +674,9 @@ def generate_config_file(
         session._session.set_config_variable("sts_regional_endpoints", 
"regional")
         sts_client = session.client(
             "sts",
-            endpoint_url=self.conn_config.get_service_endpoint_url("sts"),
+            # Not get_service_endpoint_url: it falls back to the 
connection-wide endpoint_url, which on an

Review Comment:
   Yes, fixed



##########
providers/amazon/src/airflow/providers/amazon/aws/hooks/eks.py:
##########
@@ -674,7 +674,9 @@ def generate_config_file(
         session._session.set_config_variable("sts_regional_endpoints", 
"regional")
         sts_client = session.client(
             "sts",
-            endpoint_url=self.conn_config.get_service_endpoint_url("sts"),
+            # Not get_service_endpoint_url: it falls back to the 
connection-wide endpoint_url, which on an
+            # EKS connection is an EKS endpoint, and EKS rejects tokens signed 
for a non-STS host.
+            
endpoint_url=self.conn_config.get_service_config("sts").get("endpoint_url"),

Review Comment:
   Done



-- 
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