What is Live Development?
When you runsst dev, your Lambda functions don’t run in AWS. Instead, they run locally on your machine, but they’re invoked whenever the actual deployed Lambda would be triggered.
- Instant feedback — Changes to your code are reflected immediately
- Real infrastructure — Functions interact with actual AWS resources
- Local debugging — Use breakpoints and your favorite debugging tools
- Fast iteration — No more waiting for deployments
Functions are invoked locally but have the same permissions and access as deployed functions.
How it works
When you runsst dev:
- SST deploys a stub Lambda to AWS for each function
- The stub connects to a websocket running on your local machine
- When AWS invokes the stub, it forwards the request to your local machine
- Your local function processes the request and returns the response
- The stub sends the response back to AWS
- Hot reload — Code changes are picked up immediately
- Breakpoints — Debug with your IDE
- Logs — See console.log output in your terminal
- AWS access — Full access to your AWS resources
Starting dev mode
Runsst dev in your project directory:
- Deploy your infrastructure to AWS
- Start a local development server
- Open the multiplexer UI (on Linux/macOS/WSL)
- Start watching for code changes
Multiplexer mode
By default,sst dev starts a multiplexer with tabs for different processes:
- Deploy — Shows deployment progress and watches for config changes
- Functions — Shows function invocations and logs
- Frontend — Your Next.js/Remix/Astro dev server (if applicable)
- Services — Container dev commands (if applicable)
- Tunnel — VPC bastion tunnel (if applicable)
Basic mode
If you prefer not to use the multiplexer:Mono mode
For a single stream of all logs without the tabbed UI:Live functions
All SST Function components run locally in dev mode:sst.config.ts
Making changes
Edit your function code:src/api.ts
Viewing logs
Allconsole.log output appears in the Functions tab:
Debugging
VS Code
Set breakpoints in VS Code:- Open your function in VS Code
- Click in the gutter to set a breakpoint
- Trigger your function
- The debugger will pause at your breakpoint
.vscode/launch.json:
.vscode/launch.json
Chrome DevTools
You can also debug with Chrome:-
Start SST with inspect mode:
-
Open Chrome and navigate to
chrome://inspect - Click “inspect” under your Node process
- Use the Chrome DevTools to debug
Dev mode for components
Different components behave differently in dev mode:Functions
Run locally with hot reload:Frontends
Start their dev server instead of deploying:Services
Run their dev command instead of deploying to ECS:Databases
Connect to local instances:Running commands
Wrap commands withsst dev to give them access to linked resources:
- Access to
Resourceobject - Same environment variables as your functions
- Same IAM permissions
Passing flags
Use-- to pass flags to your command:
Auto-reload
SST watches for changes to yoursst.config.ts:
sst.config.ts
- Detects the change
- Redeploys your infrastructure
- Updates linked resources
- Keeps your functions running
VPC tunneling
If your app uses a VPC with a bastion, SST automatically starts a tunnel:sst.config.ts
- Access RDS databases in private subnets
- Connect to ElastiCache clusters
- Reach other private resources
Environment variables
Environment variables work the same in dev mode:.env
sst.config.ts
src/handler.ts
Performance tips
Use file watchers
SST watches your function files for changes. For large projects, you might want to limit what’s watched:sst.config.ts
Use esbuild features
Enable esbuild features for faster builds:Limitations
Cold starts
Local functions don’t experience Lambda cold starts. To test cold start behavior, deploy to a real stage:Timeouts
Local functions don’t have Lambda’s 15-minute timeout. Long-running functions will work locally but may fail when deployed.Memory limits
Local functions use your machine’s memory, not Lambda’s configured memory. Test memory-intensive functions in a deployed environment.Comparing dev vs deploy
| Feature | sst dev | sst deploy |
|---|---|---|
| Functions | Run locally | Run in AWS |
| Frontends | Dev server | Deployed to CDN |
| Services | Dev command | Deployed to ECS |
| Databases | Can use local | Always in AWS |
| Changes | Instant | Requires redeploy |
| Cold starts | No | Yes |
| Debugging | Full IDE support | CloudWatch logs |
Best practices
Use dev mode for development
Always usesst dev during development:
Test in a deployed stage
Before deploying to production, test in a deployed staging environment:Use environment-specific config
Handle dev mode differently:sst.config.ts
Next steps
Deployment
Deploy to production
Console
Monitor your application
Debugging
Advanced debugging techniques
Development Workflow
Build a complete workflow