New to Kestra?
Use blueprints to kickstart your first workflows.
Orchestrate AWS Lambda with Kestra. Invoke functions in parallel by ARN, target versions and aliases, pass custom payloads, and parse JSON results with jq.
Stitch serverless functions into a real pipeline. This blueprint invokes several AWS Lambda functions concurrently, addresses them by ARN (including a published version and a named alias), passes a custom event payload to each, and then reads the returned JSON to extract the data you actually care about. It solves the common problem of Lambda functions that exist as isolated, event driven endpoints: instead of chaining them by hand or wiring up bespoke glue code, you coordinate them declaratively and capture their outputs in one place.
io.kestra.plugin.core.flow.Parallel task fans out three Lambda invocations so they run at the same time.io.kestra.plugin.aws.lambda.Invoke (lambda) calls a function by its functionArn.Invoke (lambda_version) targets a pinned function version via an ARN suffix and sends a functionPayload dictionary (your_event_input: hello).Invoke (lambda_alias) targets a named alias and sends its own functionPayload.io.kestra.plugin.scripts.shell.Commands task (lambda_result) runs on the io.kestra.plugin.core.runner.Process runner and uses cat plus jq -r '.body' to read {{ outputs.lambda.uri }} and pull the response body out of the JSON.version or alias, not just $LATEST.AWS Lambda has no native cross function workflow engine: each function fires on its own event with no shared run history. Kestra adds event triggers, automatic retries, full execution lineage across every invocation, and a single declarative YAML definition for the whole sequence. You get one place to schedule, observe, retry, and audit calls that the Lambda console alone cannot coordinate.
lambda:InvokeFunction permission for the target ARNs.version or alias suffixes) you want to call.This blueprint uses inline placeholder ARNs and does not reference any {{ secret('NAME') }} values. For production, store AWS credentials as secrets and reference them from the task (for example {{ secret('AWS_ACCESS_KEY_ID') }}, {{ secret('AWS_SECRET_KEY_ID') }}, and {{ secret('AWS_DEFAULT_REGION') }}) instead of hardcoding them.
demo function and a ResultHandler function in AWS (sample Python handlers below).version and create an alias (for example kestra) on ResultHandler.functionArn values with your real ARNs, including region and account id.lambda_result logs for the parsed response body.Sample demo handler:
import json
def lambda_handler(event, context):
print(event)
return {
'statusCode': 200,
'body': json.dumps('Hello from Lambda!')
}
Sample ResultHandler handler:
import json
def lambda_handler(event, context):
function_result = event['your_event_input']
return {
'body': json.dumps(function_result + ' from Kestra')
}
Invoke tasks inside the Parallel block to fan out to additional functions.Parallel block for sequential tasks if one function depends on another's output.Schedule or webhook trigger to invoke your functions on a cadence or in reaction to an event.body into downstream tasks such as a database load, a notification, or another Lambda call.