prefect_aws.lambda_function
Integrations with AWS Lambda.
Examples:
Run a lambda function with a payload
Classes
LambdaFunction
Invoke a Lambda function. This block is part of the prefect-aws
collection. Install prefect-aws with pip install prefect-aws to use this
block.
Attributes:
function_name: The name, ARN, or partial ARN of the Lambda function to run. This must be the name of a function that is already deployed to AWS Lambda.qualifier: The version or alias of the Lambda function to use when invoked. If not specified, the latest (unqualified) version of the Lambda function will be used.aws_credentials: The AWS credentials to use to connect to AWS Lambda with a default factory of AwsCredentials.
ainvoke
payload: The payload to send to the Lambda function.invocation_type: The invocation type of the Lambda function. This can be one of “RequestResponse”, “Event”, or “DryRun”. Uses “RequestResponse” by default.tail: If True, the response will include the base64-encoded last 4 KB of log data produced by the Lambda function.client_context: The client context to send to the Lambda function. Limited to 3583 bytes.
- The response from the Lambda function.
invoke
payload: The payload to send to the Lambda function.invocation_type: The invocation type of the Lambda function. This can be one of “RequestResponse”, “Event”, or “DryRun”. Uses “RequestResponse” by default.tail: If True, the response will include the base64-encoded last 4 KB of log data produced by the Lambda function.client_context: The client context to send to the Lambda function. Limited to 3583 bytes.
- The response from the Lambda function.