function
A function step is used to run an AWS Lambda-compatible function.
InfoImportant! Flowpipe function steps require Docker to be running. Make sure you have the Docker daemon installed and running.
Each step definition is a distinct instance of the step (a distinct container image); a looped step (via foreach) is ONE definition, but you cannot change the runtime or other container-specific settings in the loop.
Arguments
Argument | Type | Optional? | Description |
---|---|---|---|
env | Map | Optional | A map of string to set environment variables |
event | Object | Optional | JSON-compatible event object that contains data for a Lambda function to process |
source | String | Required | Path to the function's deployment package within the local filesystem. The path is relative to the root of the mod (where the mod.hcl). |
handler | String | Optional | Function entry point in your code, in the format filename.functionname. If not specified default handler for the runtime is used (index.handler for nodejs, lambda_function.lambda_handler for python, etc.) |
runtime | String | Required | Identifier of the function's runtime. Valid Values are nodejs:18, nodejs:20, python:3.10. |
This step also supports the common step arguments and attributes.
Attributes (Read-Only)
Attribute | Type | Description |
---|---|---|
response | Object | The response returned by the function |
Names & Labels
Container names are randomly generated using standard docker names (elegant_sutherland, etc).
Image names are generated using the following format: flowpipe/{mod}.pipeline.{pipeline name}.function.{step name}:{timestamp}, e.g: flowpipe/test_suite_mod.pipeline.with_functions.function.hello_nodejs_step:20231012T155317200
Docker labels are automatically added to images & containers using the standard format, including the standard org.opencontainers labels, as well as Flowpipe-specific labels prefixed with io.flowpipe.