fbpx
Download the Serverless Framework

The serverless framework allows creating new projects that are linked to an existing Spotinst account and deploying these projects into production. To download the framework enter the following into the terminal.

npm install -g serverless
Set up Spotinst Credentials

Next, set up your Spotinst credentials so that the functions connect to the Spotinst console.

To do this, generate either a temporary token or permanent token to connect with. Using a temporary token is only valid for two hours. Once the token is created and saved, configure credentials on your local machine. To do this, first start a new project. Follow the Node template guide or Python template guide if you need help. Once the `npm install` of the Spotinst Serverless Functions plug-in is in the root folder of the project, run the command:

serverless config credentials -p spotinst -a {your account number} -t {your token}

This creates a ~/.spotinst/credentials file which should look as follows if done correctly:

default:
    token: {your token}
    account: {your account number}

After this is properly set up you will be able to deploy functions from your computer and monitor them on the Spotinst Console