Skip to main content

Create a Standalone SST App

Take SST for a spin and create your first project.


You'll need at least Node.js 18 and npm 7. You also need to have an AWS account and AWS credentials configured locally.


If you are new to SST, we recommend you start with our latest version instead. Learn more about Ion.

1. Create a new app

Create a new SST app.

npx create-sst@latest my-sst-app

Start your local dev environment.

npx sst dev

This will give you an API endpoint like —

2. Edit the API

Let's make a change to our API. Replace the following in packages/functions/src/lambda.ts.

export const handler = ApiHandler(async (_evt) => {
return {
- body: `Hello world. The time is ${new Date().toISOString()}`,
+ statusCode: 200,
+ body: `Hi from SST ${new Date().toISOString()}`,

Now if you hit your API again, you should see the new message!

3. Add a frontend

Let's now add a frontend to our app.

Create a new Vite React app

Run the following in packages/ and name your project web.

npm create vite@latest

Add it to your stacks and link the API to it.

const web = new StaticSite(stack, "web", {
path: "packages/web",
buildOutput: "dist",
buildCommand: "npm run build",
environment: {
VITE_APP_API_URL: api.url,

Call your API

Start Vite locally and bind SST to it by running in packages/web.

npx sst bind vite

Make a call to the API in your React app. Replace the App component in src/App.tsx.

function App() {
const [message, setMessage] = useState("Hi 👋");

function onClick() {
.then((response) => response.text())

return (
<div className="App">
<div className="card">
<button onClick={onClick}>
Message is "<i>{message}</i>"

4. Deploy to prod

Let's end with deploying our app to production.

npx sst deploy --stage prod

View the source for this example on GitHub.

5. Manage in prod

You can use the SST Console to view logs and issues in prod. Create a free account and connect it to AWS.

SST app in the SST Console

Next steps

  1. Learn more about SST
  2. Ready to dive into the details of SST? Check out our guide.