SST
repository·dev·Indexed 12 days ago
https://github.com/anomalyco/sstA framework that allows developers to build full-stack applications on their own infrastructure, providing tools to deploy and manage cloud resources alongside application code. It includes a CLI, a Python SDK (sst-sdk) for accessing linked resources in Lambda functions, and support for v3.
What's inside SST
- The SST Console is a web-based dashboard used to manage SST applications. It provides a centralized interface for invoking functions, debugging issues, viewing logs, and managing multiple applications across a team. You can access it at console.sst.dev.
Key changes in SST v2
devSST v2 introduces several architectural and developer experience improvements over v1. Key changes include:
- Monopackage Migration: The package name has changed from
@serverless-stackto simplysst. - New Configuration Format: SST now uses a
.jsconfiguration file instead of a.jsonfile (similar to Vite). - Functions API Refactor: The props in the
SST Functionsconstruct have been refactored. - Improved Type Generation: The codegen process for types has been reworked for better developer experience.
- Package Manager Support: Full compatibility with
pnpm. - Enhanced CLI: Includes a new CLI UI for better visibility into CLI operations and a refactored, faster codebase.
- Performance Improvements: Faster
Live Lambda Devvia a new debug stack infrastructure. - Frontend Framework Support: New constructs for Astro and Solid.
- OpenNext: A new open-source initiative to enable Next.js applications to run on AWS with Vercel-like behavior.
- Monopackage Migration: The package name has changed from
What is an active resource in SST Console?
devAn active resource is any resource created by SST in your cloud provider. This includes:
- Resources from SST built-in components (e.g.,
Function,Nextjs,Bucket). - Resources created by any other Terraform or Pulumi provider.
Note: Complex components like
NextjsorStaticSitemay create multiple resources.Criteria for being 'Active'
- A resource is active if the stage it belongs to has been updated during the billing cycle.
- If the only update to a stage was to remove it, those resources are not counted as active.
- PR/Ephemeral Stages: A stage must exist for at least 2 weeks before its resources are counted as active. If a PR stage is created and removed within 2 weeks, it does not count toward your billing.
- Resources from SST built-in components (e.g.,
What is Autodeploy and how does it work?
devAutodeploy is a deployment workflow designed specifically for SST apps. Unlike generic CI/CD tools like GitHub Actions or CircleCI, Autodeploy offers several SST-native advantages:
- Native Workflow Support: It supports branch and Pull Request (PR) workflows out of the box.
- SST Configuration: You customize your deployment workflow directly within your
sst.config.ts. - AWS Account Integration: Builds run directly within your own AWS account, allowing them to utilize your VPC and other AWS resources.
It integrates seamlessly with the rest of the SST Console for monitoring and management.
What is OpenNext
devOpenNext is an open-source, framework-agnostic, serverless adapter for Next.js created by the SST team. It allows developers to self-host Next.js applications in serverless environments (such as AWS) by providing the deployment logic typically handled by Vercel.What is SST and how does it work?
devSST is a framework for building full-stack applications where the entire application—including databases, buckets, queues, and frontends—is defined in code within a single
sst.config.tsfile.SST uses Components to represent application features. These components automate the creation of infrastructure in your cloud provider (like AWS or Cloudflare) without requiring manual configuration in a web console. SST is built on top of Pulumi and supports over 150 providers, including Vercel and Stripe.
What is SST Ion?
devIon is the code name for a new deployment engine for SST applications. Unlike previous versions of SST that were based on AWS CDK and CloudFormation (CFN), Ion uses Terraform providers to define constructs (components) and Pulumi for deployment.
Key Differences for Developers:
- No CDK Support: You cannot use existing CDK constructs in Ion; components must be migrated to the new engine.
- Component Parity: While the underlying engine is different, the way components look and feel is intended to remain similar to the current SST experience.
- Open Source: Ion will remain completely open source.
- Future Versioning: Once Ion reaches stability, it will be released as SST v3.
What is OpenAuth?
devOpenAuth is a universal, standards-based authentication provider built on top of OAuth 2.0. It is designed as a single-page app that can be deployed anywhere (Node.js, Bun, AWS Lambda, or Cloudflare Workers) and can function as either a standalone service or be embedded into existing applications. Because it follows the OAuth 2.0 specification, any standard OAuth client can interact with it.Understand SST state and management
devSST maintains a state of your app, which is a tree of all resources and their properties. This state is stored locally and backed up to a bucket in your cloud provider account.
Important Safety Rules:
- Do not delete the state bucket: If you lose your state, SST can no longer manage your resources and you will have to manually re-import them.
- Do not manually modify low-level resources: Making manual changes in the AWS/Cloudflare console causes your infrastructure to go 'out of sync' with your SST state. You can attempt to fix this with
sst refresh, but manual changes should be avoided.
Create multiple provider instances for multi-region deployments
devBy default, SST creates one instance of each provider using default settings. You can create additional instances of a provider using the
new <provider>.Provider()constructor. This is essential for multi-region or multi-account deployments where specific resources must reside in a different location than your default stack.// Create a specific instance for us-east-1 const useast1 = new aws.Provider("useast1", { region: "us-east-1" }); // Deploy a resource to that specific provider instance new aws.acm.Certificate("cert", { domainName: "foo.com", validationMethod: "EMAIL", }, { provider: useast1 });Debug Lambda functions with Live Lambda Development
devSST features a Live Lambda Development environment that allows developers to debug Lambda functions locally while they are connected to real AWS resources. This provides a much smoother local development workflow compared to traditional serverless frameworks.Manage applications with the SST Console
devSST provides a web-based dashboard known as the SST Console to manage your applications and infrastructure visually.