AWS Lambda
Use this node to invoke an AWS Lambda function synchronously and use its response as the outgoing message — for example, running complex ML inference on device data, enriching telemetry by calling a Lambda that queries an external database, or delegating business logic to serverless functions.
Configuration
Section titled “Configuration”- Function name — required. Lambda function name or ARN. Supports templatization.
- Qualifier — function version or alias. Default:
$LATEST. - AWS Access Key ID / Secret Access Key / Region — required. IAM credentials with Lambda invoke permissions.
- Connection timeout (s) — timeout for establishing the connection. Default:
10. - Request timeout (s) — timeout for the Lambda response. Default:
5. - Tell failure if function throws exception — when enabled, routes via
Failureif the Lambda response contains a non-nullFunctionErrorfield.
The AWS request ID is added to message metadata as requestId.
Message processing algorithm
Section titled “Message processing algorithm”- Invoke the Lambda function synchronously (
RequestResponse) with the incoming message data as the payload. - On success: replace the outgoing message data with the Lambda response body; add
requestIdto metadata; route viaSuccess. - If
tellFailureIfFuncThrowsExcis enabled and the response containsFunctionError: route viaFailure. - On connection/request timeout, invalid credentials, or function not found: route via
Failure.
Output connections
Section titled “Output connections”| Connection | Condition |
|---|---|
Success | Lambda invoked and responded successfully. Outgoing message data = Lambda response. |
Failure | Timeout, invalid credentials, function not found, Lambda error (when configured), or unexpected error. |
Examples
Section titled “Examples”Example 1 — Enrich telemetry via Lambda
Section titled “Example 1 — Enrich telemetry via Lambda”Originator: DEVICE | Data: { "temperature": 25.5, "deviceId": "dev-001" }.
{ "functionName": "arn:aws:lambda:us-east-1:123456789:function:EnrichTelemetry", "qualifier": "$LATEST", "accessKey": "AKIAIOSFODNN7EXAMPLE", "secretKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", "region": "us-east-1", "connectionTimeout": 10, "requestTimeout": 5, "tellFailureIfFuncThrowsExc": true}Result: Lambda response replaces message data; requestId added to metadata. Routes via Success.
JSON schema
Section titled “JSON schema”{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "TbAwsLambdaNodeConfiguration", "type": "object", "required": ["functionName", "accessKey", "secretKey", "region"], "additionalProperties": false, "properties": { "functionName": { "type": "string" }, "qualifier": { "type": "string" }, "accessKey": { "type": "string" }, "secretKey": { "type": "string" }, "region": { "type": "string" }, "connectionTimeout": { "type": "integer" }, "requestTimeout": { "type": "integer" }, "tellFailureIfFuncThrowsExc": { "type": "boolean" } }}