Get started with Serverless Framework Open Source & AWS

Getting started with Serverless Framework’s Open Source CLI and AWS only takes a few minutes. Install with NPM, or as a standalone binary if you don't use NPM.

via NPM

Install the serverless CLI via NPM:

npm install -g serverless

Note: If you don’t already have Node on your machine, install it first. We suggest using the latest LTS version of NodeJS.

If you don't want to install Node or NPM, you can install a standalone binary.

Install as a standalone binary

MacOS/Linux

To install the latest version, run this command in your terminal:

curl -o- -L https://slss.io/install | bash

To install an specific version you may set a VERSION variable, for example:

curl -o- -L https://slss.io/install | VERSION=2.21.1 bash

Then, open another terminal window to run the serverless program.

Windows

Install with Chocolatey:

choco install serverless

Initial setup

Run the command below and follow the prompts:

serverless

The command will guide you to create a new serverless project.

Note: Users in China are presented with a setup centered around the chinese Tencent provider. If you're based in China and prefer to be presented with steps as outside of China, set the following environment variable: SERVERLESS_PLATFORM_VENDOR=aws

Upgrade

via npm

npm update -g serverless

If you have installed serverless as a standalone binary, read the following section instead.

Standalone binary

MacOS/Linux

serverless upgrade

Windows

choco upgrade serverless

Set up your free Dashboard account

Learn more about the Serverless Framework Dashboard and sign up for free.

Once you’ve signed up, login to your dashboard from the CLI:

serverless login

You can either add a new service in your dashboard, or with the CLI, using the command:

serverless
GitHub
Go to Github