AWS Lambda和Apache Airflow集成

编程入门 行业动态 更新时间:2024-10-28 12:20:02
本文介绍了AWS Lambda和Apache Airflow集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

想知道是否有人可以阐明此问题:

wondered if anyone could shed some light on this issue:

我正试图找到Airflow REST API URL来启动DAG以从AWS Lambda函数运行

I'm trying to locate the Airflow REST API URL to initiate a DAG to Run from AWS Lambda Function.

到目前为止,除了查看Apache Incubator网站提供的所有相关文档外,解决该问题的唯一指南是在Lambda中使用此URL结构(python 3.6)代码:

So far from looking at all the relevant documentation provided from the Apache Incubator Site, the only guidance to solved the problem is by using this URL structure in the Lambda (python 3.6) Code:

Apache实验API:根据该链接,https://airflow.apache/api.html#endpoints

Apache Experimental API: airflow.apache/api.html#endpoints

语法应为:

airflow_hostname/api/experimental/dags/<DAG_ID>/

但是,这无法从我的AWS Lambda函数中启动特定DAG,任何帮助/指导或指针都将非常有用。

However this fails to initiate the Specific DAG in from my AWS Lambda Function, any help/guidance or pointers would be great.

推荐答案

在Airflow 1.10中,以下发布请求将起作用:

In the Airflow 1.10 the following post request will work:

curl -X POST localhost:8080/api/experimental/dags/<dag_id>/dag_runs -H 'Cache-Control: no-cache' -H 'Content-Type: application/json' -d '{"conf":"{\"key\":\"value\"}"}'

您需要传递一个空的JSON字符串,否则发布请求将失败。

You need to pass an empty JSON string otherwise the post request will fail.

更多推荐

AWS Lambda和Apache Airflow集成

本文发布于:2023-11-24 01:30:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1623480.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Lambda   AWS   Airflow   Apache

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!