khilawar4 opened a new pull request #15727:
URL: https://github.com/apache/airflow/pull/15727


   Today since there is Dag Isolation provided as part of the airflow product , 
but dag users can generate aws_conn_id as seperate dag or some 3rd part system 
and pass back to original calling dag as part of XCOM variable , and should be 
able to over ride `aws_conn_id` param in AWS operators via Jinja template etc. 
But since `aws_conn_id` is not part of `template_fields` is all the AWS 
operators which makes dag users difficult to overide `aws_conn_id` param via 
XCOM variable using jinja template.
   
   for example : as show in below code snippet , dag user can setup aws sts 
token into XCOM variable and fetch it using jinja template in 
`EmrCreateJobFlowOperator` operator
   
   ```
   cluster_creator = EmrCreateJobFlowOperator(
           task_id='create_job_flow', 
           aws_conn_id="{{ 
task_instance.xcom_pull(task_ids='create_sts_connection', key='aws_conn_id') 
}}",
           job_flow_overrides=JOB_FLOW_OVERRIDES,
       )
   ```
   
   Read the **[Pull Request 
Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)**
 for more information.
   In case of fundamental code change, Airflow Improvement Proposal 
([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals))
 is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party 
License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in 
[UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to