nikhi-suthar commented on code in PR #26269:
URL: https://github.com/apache/airflow/pull/26269#discussion_r980232588


##########
airflow/providers/amazon/aws/hooks/glue.py:
##########
@@ -151,85 +153,150 @@ def print_job_logs(
         job_failed: bool = False,
         next_token: Optional[str] = None,
     ) -> Optional[str]:
-        """Prints the batch of logs to the Airflow task log and returns 
nextToken."""
-        log_client = boto3.client('logs')
-        response = {}
-
-        filter_pattern = FAILURE_LOG_FILTER if job_failed else 
DEFAULT_LOG_FILTER
+        """Prints the batch of Glue cloudwatch logs to the Airflow task log 
and returns nextToken."""
+        credentials = self.get_credentials(region_name=self.conn_region_name)
+        log_client = boto3.client(
+            'logs',
+            region_name=self.conn_region_name,
+            aws_access_key_id=credentials.access_key,
+            aws_secret_access_key=credentials.secret_key,
+        )

Review Comment:
   I have taken care of Log client from AWSBaseHook. It is working fine now. 
Please review now and let me know any further changes require.



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