0

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.

dl.meteo
  • 1,658
  • 15
  • 25

2 Answers2

0

Actually all provider packages can be installed via apache-airflow with the following addition:

pip install apache-airflow[docker,amazon]
dl.meteo
  • 1,658
  • 15
  • 25
0

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
Rene B.
  • 6,557
  • 7
  • 46
  • 72