Step Functions
Configuring step functions for Lumigo
To configure your step functions to integrate with Lumigo, perform the following steps:
- Add an environment variable - LUMIGO_STEP_FUNCTION to Lambda functions that are triggered by your step function’s state machine, and set its value to “TRUE”:
Key | Value |
---|---|
LUMIGO_STEP_FUNCTION | TRUE |
Modified Function Return Value
A JSON attribute - "_lumigo" - with a unique identifier will be automatically added to the return value of your handler function. This attribute will resemble the following:
"_lumigo": { "step_function_uid": "your-step-function-id" }
- If you are using custom Parameters , update your Paramters definition to include the following line:
"_lumigo.$": "$.['_lumigo', 'null']"
Below is an example:
"States": {
"state1": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-west-2:ACCOUNT:function:FUNCTION_NAME",
"Parameters": {
"size.$": "$.product.details.size",
"exists.$": "$.product.availability",
"_lumigo.$": "$.['_lumigo', 'null']"
},
"Next": "state2"
},
"state2": {
"Type": "pass",
"End": true
}
}
Updated about 2 years ago