ferruzzi commented on code in PR #34890:
URL: https://github.com/apache/airflow/pull/34890#discussion_r1361153782


##########
airflow/providers/amazon/aws/operators/lambda_function.py:
##########
@@ -62,13 +61,15 @@ class LambdaCreateFunctionOperator(BaseOperator):
     :param aws_conn_id: The AWS connection ID to use
     """
 
+    aws_hook_class = LambdaHook
     template_fields: Sequence[str] = (
         "function_name",
         "runtime",
         "role",
         "handler",
         "code",
         "config",
+        *AwsBaseOperator.template_fields,

Review Comment:
   A variation on that might be to have each operator define 
"op_template_fields" and have BaseOperator's `template_fields` return base+op?  
Basically:
   
   ```python
   Class BaseOperator:
       base_template_fields = ("aws_conn_id", "region_name", "verify")
   
       @cache
       def template_fields:
           return self.base_template_fields + self.operator_template_fields
           
           
   Class MyOperator:
       op_template_fields =  ("foo", ''"bar")
   ```



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to