FaaSpot is a SaaS service that enables you to run Functions as a Service (FaaS), and reduce your monthly Cloud expenses. The concept provides the ability for you to run your functions on a FaaSpot spot. A FaaSpot spot is a VM that can run your functions. You can run multiple concurrent functions on one spot. Nevertheless, the more spots that you have, the more concurrent functions you'll be able to run. The cool thing about FaaSpot, is that you pay for each spot that you have, regardless of the number of functions that you run on it, and it actually uses AWS spots to reduce costs.
Note
Communication with the FaaSpot
webserver is encrypted and secured.
You can access FaaSpot using the FaaSpot client from the VM, directly from the Python script (as a library), or by using the proprietary REST API. The FaaSpot’s command-line interface is the default method for interacting with FaaSpot and managing your functions.
You can install the FaaSpot Client via pip:
$ pip install faaspot
Note
After installing the FaaSpot client you'll have both the command-line interface (CLI) and a python-client library.
The CLI client name is fas
and the python-client library name is faaspot
.
To upgrade the FaaSpot client version, run: pip install faaspot --upgrade
.
For info about the CLI, go to the CLI page. For info about the python library, go to the functions page.
To use the FaaSpot client, you need to configure your profile. This configuration will apply to both the CLI and the python-client library. Create a FaaSpot profile that contains your FaaSpot token credentials.
$ fas profiles create --token MY_API_TOKEN
Note
The fas profiles create
command will create a global configuration file located at ~/.faaspot folder,
which contain the connection configuration to FaaSpot.
You can also manually edit the ~/.faaspot/conf.yaml
file.
Note
fas
supports tab completion in bash shells via the argcomplete package.
To enable it, add
eval "$(register-python-argcomplete fas)"to the
~/.basrc
file. You can add it manually or by running$ echo -e '\neval "$(register-python-argcomplete fas)"\n' >> ~/.bashrcand then run
source ~/.bashrc
. You can test that it works by running$ fas sp<TAB>It should complete to
$ fas spots