erdos2n commented on code in PR #33408:
URL: https://github.com/apache/airflow/pull/33408#discussion_r1294756676
##########
airflow/providers/amazon/aws/hooks/glue.py:
##########
@@ -114,12 +119,14 @@ def create_glue_job_config(self) -> dict:
"ScriptLocation": self.script_location,
}
command = self.create_job_kwargs.pop("Command", default_command)
- execution_role = self.get_iam_execution_role()
+ if not self.role_arn:
+ execution_role = self.get_iam_execution_role()
+ self.role_arn = execution_role["Role"]["Arn"]
Review Comment:
@vincbeck updated. assigned the role for both cases to a local variable
`role_arn`. Let me know if this works. I did not want to put the if/else logic
on line #131.
##########
airflow/providers/amazon/aws/operators/glue.py:
##########
@@ -53,7 +53,8 @@ class GlueJobOperator(BaseOperator):
:param num_of_dpus: Number of AWS Glue DPUs to allocate to this Job.
:param region_name: aws region name (example: us-east-1)
:param s3_bucket: S3 bucket where logs and local etl script will be
uploaded
- :param iam_role_name: AWS IAM Role for Glue Job Execution
+ :param iam_role_name: AWS IAM Role for Glue Job Execution. If set
iam_role_arn must equal None.
+ :param iam_role_arn: AWS IAM ARN for Glue Job Execution. If set
iam_role_name must equal None.
Review Comment:
@vincbeck updated
--
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]