Glue Hook not using aws_conn_id for logs access resulting in Error #37976
Labels
area:providers
good first issue
kind:bug
This is a clearly a bug
provider:amazon
AWS/Amazon - related issues
Apache Airflow Provider(s)
amazon
Versions of Apache Airflow Providers
8.16.0
Apache Airflow version
2.8.1
Operating System
Apache Airflow Official Docker Image
Deployment
Official Apache Airflow Helm Chart
Deployment details
Deployed on AWS EKS
What happened
When using the Glue Operator and enabling the verbose parameter, we get the following error.
It's seems that the the GlueHook is not using a LogHook, but rather a newly instancied boto3 client here :
airflow/airflow/providers/amazon/aws/hooks/glue.py
Line 228 in 19ebcac
So this new instance of boto3 client is using the pod ServiceAccount IAM credentials and not the provided Hook (via aws_conn_id) which are differents.
So when we are using the Operator with the verbose parameter set to True, we get this stack trace:
What you think should happen instead
The GlueHook should create a LogHook like in the SageMaker hook
airflow/airflow/providers/amazon/aws/hooks/sagemaker.py
Line 156 in 19ebcac
How to reproduce
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: