Lambda usage

A lambda may be used inside the kubernetes cluster. It is available using host the same as lambda id and 8000 port.

A lambda may be used outside the kubernetes cluster using luna-lamda as proxy by lambda proxy requests.

Each lambda has its own api, whose description is also available using the get lambda documentation request.

Each lambda response will contain several headers, including:

  • Luna-Request-Id - it works the same way as in any luna service (see the luna-lambda OpenAPI specification for details)

  • Lambda-Version - contains the current lambda version

There are several possibilities to get info about a lambda during it works:

There is possibility to stop/pause lambda using the switch lambda request. See lambda switch for more info.

A lambda can be deleted using the delete lambda request. The lambda pod will be stopped and deleted as well as S3 object with lambda archive. There is also will be an attempt to remove the lambda image manifest from the registry in a background task. Note, that it will only work if deletion is enabled in the registry, otherwise the service will log the failed attempt to remove image and save this message to monitoring (the lambda_logs series with operation_code 100 and error_code 10000, see lambda logs series codes). A successful manifest deletion message also will be saved to monitoring. Deleting the image manifest from the registry removes only the manifest, so image layers are deleted from the registry storage on the next registry garbage collection run, which is not started by the luna-lambda service. See docker registry requirements for details.