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 <./_static/api.html#tag/lambda-proxy>`_. Each lambda has its own api, whose description is also available using the `get lambda documentation request <./_static/api.html#operation/getLambdaSpec>`_. 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 <./_static/api.html>`_ for details) - `Lambda-Version` - contains the current lambda version There are several possibilities to get info about a lambda during it works: - to get lambda info use `get lambda <./_static/api.html#operation/getLambda>`_ - to get lambda status use `get lambda status <./_static/api.html#operation/getLambdaStatus>`_ - to get lambda logs use `get lambda logs <./_static/api.html#operation/getLambdaLogs>`_ There is possibility to stop/pause lambda using the `switch lambda request <./_static/api.html#operation/switchLambda>`_. See `lambda switch <./lambda_switch>`_ for more info. A lambda can be deleted using the `delete lambda request <./_static/api.html#operation/deleteLambda>`_. 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 <./monitoring.html#lambda-logs-series-codes-description>`_). 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 <./lambda_requirements.html#docker-registry-requirements>`_ for details.