Serverless functions are the core unit of compute on the platform. Each function is an isolated handler that receives an event and a context and returns a result—whether you invoke it from the editor, from async jobs, or through HTTP routes on the gateway.
Run in the test panel sends your JSON as the event object directly, with no API Gateway wrapper. HTTP routes instead pass an API Gateway–style event with a string body. Handlers often branch on typeof event.body === 'string' (Node.js) or the equivalent check so that both invocation paths work.
How to create functions
- From the UI — click + New Function on the Functions page. Optionally upload a
.ziparchive with your code. - Drag and drop — drop files or folders onto the file tree in the editor sidebar.
Function configuration
| Setting | Default | Description |
|---|---|---|
| Handler | index.handler | The entry point, written as file.export. |
| Runtime | nodejs22 | Node.js 22, Python 3.12, or Go 1.22 |
| Timeout | 5 000 ms | Maximum execution time before the platform stops the function. |
| Memory | 256 MB | Memory limit for the function's container. Default 256 MB; the minimum is 64 MB and the maximum is 2,048 MB (2 GB). |
| Network | — | Enable to allow outbound HTTP/TCP connections from the function. This only takes effect when the server also sets <code>ALLOW_NETWORK_FUNCTIONS=true</code> (off by default); with the server flag off, a function's network request is overridden to no-network. |
| Layers | — | Optional list of catalog layer IDs attached to the function (see the Layers page). |
| Runtime variant (Node.js) | lite | <code>lite</code> (default) or <code>full</code> — selects the Node.js container image. Use <code>full</code> when you need the heavier browser-capable stack. |
Hot containers
Click Deploy to pre-warm containers for the function. Hot containers keep an HTTP server running inside the container, so subsequent invocations reuse a running process and skip the cold-start work of creating a container, booting the runtime, and loading your handler.
Containers above the per-function minimum are recycled after 5 minutes idle, and the last remaining container stops after 10 minutes idle. Both thresholds are configurable through HOT_LAMBDA_TTL_MS and HOT_LAMBDA_MAX_IDLE_TTL_MS.
The server must run with ENABLE_HOT_LAMBDAS=true; otherwise Deploy reports that hot lambdas are not enabled.
Test panel
The right-hand panel in the editor provides tabs for running and configuring the function:
- Run — a synchronous invoke that passes your JSON as the
event. Enable Stream to receive a Server-Sent Events stream from supported runtimes. - Config — the handler, timeout, network access, Node.js runtime variant, layers, and environment variables.
- Traces — recent runs of this function, using the same trace model as the Executions page.
- AI — the in-editor assistant, available when your deployment enables it.