I am using Airflow 2.2.5 and want to trigger an AWS lambda function.
This is my Dockerfile
FROM apache/airflow:latest
RUN pip install --no-cache-dir apache-airflow-providers-docker==2.5.0 boto3==1.21.45 apache-airflow-providers-amazon==3.0.0
And here is how I import aws_lambda Invoke:
from airflow.providers.amazon.aws.operators.aws_lambda import AwsLambdaInvokeFunctionOperator
I followed the instructions in the documentation . But unfortunately the module can't be found.
Actually all provider packages can be installed via apache-airflow
with the following addition:
pip install apache-airflow[docker,amazon]
The operator was only added in apache-airflow-providers-amazon==3.1.1
as @Oluwafemi Sule mentioned.
You can install newer aws operators with the following command:
pip install apache-airflow-providers-amazon>=3.1.1
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.