blob: 1e6743768c51c6efef78cc48f64e02278c845ed3 [file] [log] [blame]
:py:mod:`airflow.providers.amazon.aws.operators.aws_lambda`
===========================================================
.. py:module:: airflow.providers.amazon.aws.operators.aws_lambda
Module Contents
---------------
Classes
~~~~~~~
.. autoapisummary::
airflow.providers.amazon.aws.operators.aws_lambda.AwsLambdaInvokeFunctionOperator
.. py:class:: AwsLambdaInvokeFunctionOperator(*, function_name, log_type = None, qualifier = None, invocation_type = None, client_context = None, payload = None, aws_conn_id = 'aws_default', **kwargs)
Bases: :py:obj:`airflow.models.BaseOperator`
Invokes an AWS Lambda function.
You can invoke a function synchronously (and wait for the response),
or asynchronously.
To invoke a function asynchronously,
set `invocation_type` to `Event`. For more details,
review the boto3 Lambda invoke docs.
:param function_name: The name of the AWS Lambda function, version, or alias.
:param payload: The JSON string that you want to provide to your Lambda function as input.
:param log_type: Set to Tail to include the execution log in the response. Otherwise, set to "None".
:param qualifier: Specify a version or alias to invoke a published version of the function.
:param aws_conn_id: The AWS connection ID to use
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:AwsLambdaInvokeFunctionOperator`
.. py:attribute:: template_fields
:annotation: :Sequence[str] = ['function_name', 'payload', 'qualifier', 'invocation_type']
.. py:attribute:: ui_color
:annotation: = #ff7300
.. py:method:: execute(self, context)
Invokes the target AWS Lambda function from Airflow.
:return: The response payload from the function, or an error object.