Set up SST (Serverless Stack) for full-stack serverless apps
✓Works with OpenClaudeYou are a serverless infrastructure engineer. The user wants to set up SST (Serverless Stack) for building and deploying full-stack serverless applications on AWS.
What to check first
- Run
node --versionto confirm Node.js 16+ is installed - Run
aws configureand verify AWS credentials are set (check~/.aws/credentials) - Run
npm list -g sstto see if SST is already installed globally
Steps
- Install SST CLI globally with
npm install -g sst - Create a new project directory and run
sst init --language typescript(or--language javascript) to scaffold the project structure - Review the generated
sst.config.tsfile — this is your app configuration and stack definition - Install project dependencies with
npm installto get SST packages, AWS CDK, and dev dependencies - Create your backend resources in the
stacks/directory (API, database, storage, auth) using SST's type-safe constructs likeApi,RDS,Table,Bucket - Define your frontend in
packages/web/orfrontend/directory and reference backend resources usinguse(YourStack)pattern - Run
sst devto start the local development environment with live reloading and hot module replacement - Deploy to AWS with
sst deploy --stage productionafter testing locally
Code
// sst.config.ts
import { SSTConfig } from "sst";
import { Stack } from "sst/constructs";
import * as apigateway from "aws-cdk-lib/aws-apigateway";
import * as lambda from "aws-cdk-lib/aws-lambda";
export default {
config(_input) {
return {
name: "my-sst-app",
region: "us-east-1",
};
},
stacks(app) {
app.stack(function ApiStack({ stack }) {
// Create DynamoDB Table
const table = new sst.aws.Dynamo(stack, "notes", {
fields: {
id: "string",
userId: "string",
content: "string",
},
primaryIndex: { hashKey: "id" },
globalIndexes: {
userIdIndex: {
hashKey: "userId",
},
},
});
// Create Lambda function
const lambda = new sst.aws.Function(stack, "api-handler", {
handler: "packages/functions/src/api.handler",
environment: {
TABLE_NAME: table.tableName,
},
permissions: [table],
});
// Create API Gateway
const api = new sst.aws.ApiGatewayV1(stack, "api", {
routes: {
"POST /notes": "packages/functions/src/create.handler",
"GET /notes
Note: this example was truncated in the source. See the GitHub repo for the latest full version.
Common Pitfalls
- Treating this skill as a one-shot solution — most workflows need iteration and verification
- Skipping the verification steps — you don't know it worked until you measure
- Applying this skill without understanding the underlying problem — read the related docs first
When NOT to Use This Skill
- When a simpler manual approach would take less than 10 minutes
- On critical production systems without testing in staging first
- When you don't have permission or authorization to make these changes
How to Verify It Worked
- Run the verification steps documented above
- Compare the output against your expected baseline
- Check logs for any warnings or errors — silent failures are the worst kind
Production Considerations
- Test in staging before deploying to production
- Have a rollback plan — every change should be reversible
- Monitor the affected systems for at least 24 hours after the change
Related Serverless Skills
Other Claude Code skills in the same category — free to download.
Vercel Deploy
Deploy and configure applications on Vercel
Netlify Deploy
Deploy and configure applications on Netlify
Serverless Framework
Configure Serverless Framework for multi-cloud deployment
Edge Functions
Build and deploy edge functions (Vercel, Cloudflare Workers)
Serverless Database
Set up serverless databases (PlanetScale, Neon, Turso)
Serverless Cron
Set up serverless cron jobs and scheduled functions
Serverless Queue
Implement serverless queues and event-driven processing
Want a Serverless skill personalized to YOUR project?
This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.