Skip to main content
This quickstart will help you create and deploy your first SST application in just a few minutes.

Prerequisites

Before you begin, make sure you have:
  • Node.js 18+ installed on your machine
  • An AWS account with credentials configured
  • Basic knowledge of TypeScript (helpful but not required)

Create a new project

1

Install SST

Install SST in your project:
npm install sst
Or install the CLI globally:
curl -fsSL https://sst.dev/install | bash
2

Initialize SST

Initialize SST in your project:
npx sst init
This creates an sst.config.ts file in your project root.
3

Configure your app

Open sst.config.ts and add your first resources:
sst.config.ts
/// <reference path="./.sst/platform/config.d.ts" />

export default $config({
  app(input) {
    return {
      name: "my-app",
      removal: input?.stage === "production" ? "retain" : "remove",
      home: "aws",
    };
  },
  async run() {
    // Create an S3 bucket
    const bucket = new sst.aws.Bucket("MyBucket");

    // Create a function with a public URL
    const api = new sst.aws.Function("MyApi", {
      handler: "src/api.handler",
      link: [bucket],
      url: true,
    });

    return {
      api: api.url,
      bucket: bucket.name,
    };
  },
});
4

Create your function

Create a src/api.ts file with your function code:
src/api.ts
import { Resource } from "sst";
import { S3Client, ListObjectsV2Command } from "@aws-sdk/client-s3";

const s3 = new S3Client({});

export const handler = async () => {
  // Access the linked bucket
  const bucketName = Resource.MyBucket.name;

  const command = new ListObjectsV2Command({
    Bucket: bucketName,
  });

  const response = await s3.send(command);

  return {
    statusCode: 200,
    body: JSON.stringify({
      message: "Hello from SST!",
      bucket: bucketName,
      objects: response.Contents?.length || 0,
    }),
  };
};
Install the AWS SDK:
npm install @aws-sdk/client-s3
5

Configure AWS credentials

Make sure your AWS credentials are configured. SST will use your default AWS profile.You can verify your credentials with:
aws sts get-caller-identity
If you need to configure credentials:
aws configure
6

Deploy your app

Deploy your application:
npx sst deploy
SST will:
  • Create the S3 bucket
  • Deploy the Lambda function
  • Set up IAM permissions automatically
  • Output the function URL
The first deployment takes a few minutes as SST sets up the infrastructure in your AWS account.
7

Test your function

After deployment completes, you’ll see output like:
  Complete
   api: https://abc123.lambda-url.us-east-1.on.aws/
   bucket: my-app-mybucket-a1b2c3d4
Test your function by visiting the URL in your browser or using curl:
curl https://abc123.lambda-url.us-east-1.on.aws/
You should see:
{
  "message": "Hello from SST!",
  "bucket": "my-app-mybucket-a1b2c3d4",
  "objects": 0
}

Development mode

For local development with hot reload, use sst dev:
npx sst dev
This starts the SST multiplexer with:
  • Live Lambda Development — Your functions run locally and are invoked when triggered
  • Hot reload — Code changes are reflected instantly
  • Full AWS access — Your local functions have the same permissions as deployed functions
sst dev is much faster than deploying every time you make a change. Use it during development and sst deploy for production deployments.

Make changes

Try modifying your function:
src/api.ts
import { Resource } from "sst";
import { S3Client, ListObjectsV2Command } from "@aws-sdk/client-s3";

const s3 = new S3Client({});

export const handler = async () => {
  const bucketName = Resource.MyBucket.name;

  const command = new ListObjectsV2Command({ Bucket: bucketName });
  const response = await s3.send(command);

  return {
    statusCode: 200,
    body: JSON.stringify({
      message: "Hello from SST! Updated version.",
      bucket: bucketName,
      objects: response.Contents?.length || 0,
      timestamp: new Date().toISOString(),
    }),
  };
};
With sst dev running, your changes are live immediately. Just refresh the URL to see the update.

Clean up

When you’re done, remove all resources:
npx sst remove
This deletes all the resources SST created in your AWS account.
If you deployed to production with --stage production, make sure to remove that stage too:
npx sst remove --stage production

Next steps

Now that you have a working SST app, explore more features:

Live Development

Learn how Live Lambda Development works

Resource Linking

Connect your resources together

Stage Management

Manage multiple environments

Deployment

Deploy to production

Build docs developers (and LLMs) love