Lambda reference table
This page contains a comprehensive reference table of all functions, classes, and constants available for lambda development, categorized by lambda type.
Note
This table provides a quick reference. For detailed descriptions, follow the links to the corresponding documentation pages.
Common (all lambda types)
Function/Class/Constant |
Required |
Description Link |
|---|---|---|
logger |
Optional |
|
UserCtx |
Optional |
|
UserCtx.onStart |
Optional |
|
UserCtx.onShutdown |
Optional |
|
UserException |
Optional |
|
LambdaUserHandler |
Optional |
|
ROUTES_TO_ADD |
Optional |
|
lambda_config.yml |
Optional |
|
checkWarmup |
Optional |
|
requirements.txt / pyproject.toml |
Optional |
Standalone Lambda
Function/Class/Constant |
Required |
Description Link |
|---|---|---|
StandaloneLambdaRequest |
Required |
|
main(request: StandaloneLambdaRequest) |
Required |
|
request.json |
Optional |
|
request.getBody() |
Optional |
|
request.headers |
Optional |
|
request.args |
Optional |
|
request.clients |
Optional |
|
request.eventsEnabled |
Optional |
|
request.senderEnabled |
Optional |
|
request.handlersEnabled |
Optional |
|
Clients |
Optional |
Handlers Lambda
Function/Class/Constant |
Required |
Description Link |
|---|---|---|
HandlersLambdaRequest |
Required |
|
main(request: HandlersLambdaRequest) |
Required |
|
request.data |
Optional |
|
request.data.sources |
Optional |
|
request.handlerId |
Optional |
|
request.headers |
Optional |
|
request.args |
Optional |
|
request.clients |
Optional |
|
HandlerDataSchema |
Optional |
|
HandlerSource |
Optional |
Agent Lambda
Function/Class/Constant |
Required |
Description Link |
|---|---|---|
AVAILABLE_ANALYTICS |
Required |
|
ANALYTICS_LICENSE_FEATURES |
Optional |
|
ESTIMATORS_TO_INITIALIZE |
Optional |
|
ESTIMATORS_TARGETS |
Optional |
|
REGISTRATION_ATTEMPT_COUNT |
Optional |
|
REGISTRATION_ATTEMPT_DELAY |
Optional |
|
FEEDBACK_MAX_BATCH_COUNT |
Optional |
|
WSCODE_GOING_AWAY |
Optional |
|
AGENT_NAME |
Optional |
|
AGENT_DESCRIPTION |
Optional |
|
AgentClients |
Optional |
|
ROUTES_TO_ADD |
Optional |
|
LambdaUserHandler |
Optional |
|
Analytics module (analytics.py) |
Required |
|
Analytics module (common.py) |
Required |
|
Analytics module (classes.py) |
Required |
|
Analytics module (models.py) |
Optional |
|
getDocumentation() |
Required |
Tasks Lambda
Function/Class/Constant |
Required |
Description Link |
|---|---|---|
BaseLambdaTask |
Required |
|
LambdaTask (user class inheriting BaseLambdaTask) |
Required |
|
splitTasksContent(content: dict) |
Required |
|
executeSubtask(subtaskContent: dict) |
Required |
|
UserTaskLambdaException |
Optional |
|
self.clients |
Optional |
|
TasksClients |
Optional |
|
ROUTES_TO_ADD |
Optional |
|
LambdaUserHandler |
Optional |
Luna Services Clients (common for all types)
A client is available only if the corresponding service is enabled for the lambda, except the always available lambdas client and the api client of an external agent. See the availability matrix for the clients provided by every lambda type.
Client |
Required |
Description Link |
|---|---|---|
clients.events (Events) |
Optional |
|
clients.faces (Faces) |
Optional |
|
clients.matcher (LPM) |
Optional |
|
clients.faceSamplesStore (LIS) |
Optional |
|
clients.bodySamplesStore (LIS) |
Optional |
|
clients.imageOriginStore (LIS) |
Optional |
|
clients.objectOriginStore (LIS, tasks lambda only) |
Optional |
|
clients.sdk (LRS) |
Optional |
|
clients.videoAgent (LVA) |
Optional |
|
clients.sender (Sender) |
Optional |
|
clients.handlers (Handlers) |
Optional |
|
clients.lambdas (Lambdas internal api) |
Optional |
|
clients.api (Luna API, external agent only) |
Optional |