AWS Lambda Operators¶
AWS Lambda is a serverless, event-driven compute service that lets you run code for virtually any type of application or backend service without provisioning or managing servers. You can trigger Lambda from over 200 AWS services and software as a service (SaaS) applications, and only pay for what you use.
Airflow provides an operator to invoke an AWS Lambda function.
Prerequisite Tasks¶
Invoke an existing AWS Lambda function with a payload¶
To publish a message to an Amazon SNS Topic you can use
AwsLambdaInvokeFunctionOperator
.
invoke_lambda_function = AwsLambdaInvokeFunctionOperator(
task_id='setup__invoke_lambda_function',
function_name=LAMBDA_FUNCTION_NAME,
payload=SAMPLE_EVENT,
)