Airflow 无法使ECSOperator(Fargate)与气流一起工作

Airflow 无法使ECSOperator(Fargate)与气流一起工作,airflow,aws-fargate,Airflow,Aws Fargate,在Airflow 1.10.1中使用ECSOperator通过ECS Fargate运行任务时,我遇到了这个错误。DAG代码可用 不确定哪里出了问题,因为在args字典中传递了网络\u配置,类似于此处所做的操作自Airflow v1.10.3起,网络\u配置已添加到ESCOperator中。我建议将Airflow版本升级到v1.10.3 参考: 运行远门的ECSOperator的示例配置 气流版本-v1.10.3 def get_ecs_operator_args(param): ret

在Airflow 1.10.1中使用ECSOperator通过ECS Fargate运行任务时,我遇到了这个错误。DAG代码可用

不确定哪里出了问题,因为在args字典中传递了
网络\u配置
,类似于此处所做的操作

自Airflow v1.10.3起,网络\u配置已添加到ESCOperator中。我建议将Airflow版本升级到v1.10.3

参考:

运行远门的ECSOperator的示例配置 气流版本-v1.10.3

def get_ecs_operator_args(param):
    return dict(

launch_type="FARGATE", 
              # The name of your task as defined in ECS

task_definition="my_automation_task",
              # The name of your ECS cluster

cluster="my-cluster", 
              network_configuration={

                    'awsvpcConfiguration': {
                           'securityGroups': ['sg-hijk', 'sg-abcd'],
                           'subnets': ['subnet-lmn'],
                           'assignPublicIp': "ENABLED"
                       }
               }, 
              overrides = {
                        'containerOverrides': [
                          {
                               'name': "my-container",
                               'command': ["python", "myCode.py",
                                           str(param)]
                           }
                         ]
                },


region_name="us-east-1")

ecs_args = get_ecs_operator_args("{{ dag_run.conf['name'] }}")

my_operator = ECSOperator( task_id= "task_0",**ecs_args, dag=dag)
def get_ecs_operator_args(param):
    return dict(

launch_type="FARGATE", 
              # The name of your task as defined in ECS

task_definition="my_automation_task",
              # The name of your ECS cluster

cluster="my-cluster", 
              network_configuration={

                    'awsvpcConfiguration': {
                           'securityGroups': ['sg-hijk', 'sg-abcd'],
                           'subnets': ['subnet-lmn'],
                           'assignPublicIp': "ENABLED"
                       }
               }, 
              overrides = {
                        'containerOverrides': [
                          {
                               'name': "my-container",
                               'command': ["python", "myCode.py",
                                           str(param)]
                           }
                         ]
                },


region_name="us-east-1")

ecs_args = get_ecs_operator_args("{{ dag_run.conf['name'] }}")

my_operator = ECSOperator( task_id= "task_0",**ecs_args, dag=dag)