Skip to main content

Quick Start

SST is a collection of npm packages that allow you to create a serverless app. You can define your apps with a combination of Infrastructure as Code (using CDK) and Lambda functions.

To use SST you'll need:

Getting started

Create a new project using.

npx create-sst@latest my-sst-app
cd my-sst-app
npm install

Starting local environment

The first time the SST command is run, you'll be prompted to enter a default stage name to use. The stage name will be stored locally in a .sst/ directory. This directory is automatically ignore from Git.

The initial deploy can around 5-10 minutes. It will deploy your app to AWS, and also setup Live Lambda dev environment.

npx sst start

This command uses your default AWS Profile and the region specified in your sst.json. If you want to use a different AWS account or region, you can do:

AWS_PROFILE=my-profile npx sst start --region eu-west-1

Using SST Console

The SST Console is a web based dashboard to manage your SST apps. Once sst start is up and running, you should see the following printed out in the terminal.

==========================
Starting Live Lambda Dev
==========================

SST Console: https://console.serverless-stack.com/my-sst-app/frank/local
Debug session started. Listening for requests...

Open the SST Console in the browser.

SST Console homescreen

Deploying an app

Once your app has been built and tested successfully, you are ready to deploy it to AWS.

npx sst deploy --stage prod

Similarly, to deploy to a different AWS account or region, you can do:

AWS_PROFILE=my-profile npx sst deploy --stage prod --region eu-west-1

Using SST Console

This allows you look at logs in production and manage resources in production as well.

npx sst console --stage prod

Removing an app

Finally, you can remove all your stacks and their resources from AWS using.

npx sst remove

Or if you've deployed to a different stage.

npx sst remove --stage prod

Note that this command permanently removes your resources from AWS. It also removes the stack that's created as a part of the debugger.