aws_lambda
Invoke AWS Lambda functions from your workflow for serverless processing.
Overview
Invoke AWS Lambda functions from your workflow for serverless processing. This step enables you to call AWS Lambda functions synchronously or asynchronously, passing event data as the Lambda payload. Lambda functions can perform any custom processing (data transformation, external API calls, ML inference, etc.) and return results that are merged back into your event. You can pass the entire event or select specific fields, control invocation type (synchronous or async), specify Lambda versions/aliases, and configure AWS credentials per invocation. Perfect for integrating existing Lambda functions into workflows without rewriting logic.
Quick Start
steps:
- type: aws_lambda
function_name: my-functionConfiguration
| Parameter | Type | Required | Description |
|---|---|---|---|
function_name | string | Yes | AWS Lambda function name or full ARN to invoke. |
aws_access_key_id | string | No | Explicit AWS access key ID. When omitted, boto3 falls back to its default credential chain. |
aws_secret_access_key | string | No | Explicit AWS secret access key paired with 'aws_access_key_id'. |
aws_session_token | string | No | Session token used for temporary credentials (for example STS AssumeRole). |
region_name | string | No | AWS region passed to the Lambda client (default 'us-east-1').
Default: "us-east-1" |
endpoint_url | string | No | Custom Lambda endpoint, useful for LocalStack or moto testing environments. |
use_ssl | boolean | No | Whether to use HTTPS for the Lambda client connection (default True).
Default: true |
verify | boolean | No | Whether to verify SSL certificates when 'use_ssl' is True (default True).
Default: true |
invocation_type | string | No | Invocation type to pass to Lambda ('RequestResponse', 'Event', or 'DryRun'). Defaults to 'RequestResponse'.
Default: "RequestResponse" |
qualifier | string | No | Version or alias qualifier appended to the invocation (for example '1' or 'prod'). |
input_from | string | No | Dot-delimited path whose value is JSON-serialized and sent as the Lambda payload. When omitted, the entire event is sent. |
payload_key | string | No | DEPRECATED: Use 'input_from' instead. Dot-delimited path for Lambda payload. |
output_to | string | No | Dot path where the parsed JSON response is stored. Defaults to 'lambda_response'.
Default: "lambda_response" |
result_path | string | No | DEPRECATED: Use 'output_to' instead. Dot path to store parsed JSON result. |
client_args | string | No | Additional keyword arguments merged into boto3's client('lambda', **client_args) call. |
Examples
Synchronous Lambda invocation
Call a Lambda function and wait for the response
type: aws_lambda
function_name: data-enrichment-function
aws_access_key_id: ${env:aws_access_key}
aws_secret_access_key: ${env:aws_secret_key}
region_name: us-east-1
output_to: enriched_data
Invoke with specific payload subset
Send only relevant data to reduce Lambda payload size
type: aws_lambda
function_name: email-validator
aws_access_key_id: ${env:aws_access_key}
aws_secret_access_key: ${env:aws_secret_key}
region_name: us-west-2
input_from: user.email
output_to: validation_result
Async fire-and-forget invocation
Trigger Lambda without waiting for response
type: aws_lambda
function_name: notification-sender
aws_access_key_id: ${env:aws_access_key}
aws_secret_access_key: ${env:aws_secret_key}
region_name: us-east-1
invocation_type: Event
Invoke specific Lambda version
Call a specific version or alias of a Lambda function
type: aws_lambda
function_name: ml-inference-model
aws_access_key_id: ${env:aws_access_key}
aws_secret_access_key: ${env:aws_secret_key}
region_name: us-east-1
qualifier: prod
input_from: features
output_to: predictions
Advanced Options
These options are available on all steps for error handling and retry logic:
| Parameter | Type | Default | Description |
|---|---|---|---|
retries | integer | 0 | Number of retry attempts (0-10) |
backoff_seconds | number | 0 | Backoff (seconds) applied between retry attempts |
retry_propagate | boolean | false | If True, raise last exception after exhausting retries; otherwise swallow. |