Execution Modes

Lithops compute backends can be classified in 3 different execution modes depending on the backend you choose.

Localhost mode

This mode allows to run functions in your local machine, using the available local CPUs. This is the default mode of execution if no configuration is provided.


This is the preferable option for starting with Lithops, and for testing (debugging) your applications.

fexec = lithops.LocalhostExecutor()

Serverless mode

This mode allows to run functions by using one or multiple function-as-a-service (FaaS) Serverless compute backends. In this mode of execution, each function invocation equals to a parallel task running in the cloud in an isolated environment.

In this mode of execution, the execution environment depends of the serverless compute backend. For example, in AWS Lambda, IBM Cloud Functions, Google Cloud Run, IBM Code Engine and Kubernetes you must use a Docker image as execution environment. In contrast, Google cloud functions, Azure functions and Aliyun Functions use their own formats of environments.

fexec = lithops.ServerlessExecutor()

Standalone mode

This mode allows to run functions by using a remote host or a cluster of virtual machines (VM). In the VM, functions run using parallel processes. This mode of executions is similar to the localhost mode, but using remote machines. In this case, it is not needed to install anything in the remote VMs since Lithops does this process automatically the first time you use them.


This is the preferable option if your application (or a part) requires a more powerful environment than the ones provided by the Serverless backends (in terms of CPU and Memory).

fexec = lithops.StandaloneExecutor()