sst Documentation

Build full-stack apps on your own infrastructure.

26,368 stars TypeScript TypeScript 1 file · ~160,965 tokens
RAW Doc

File: README.md


Build full-stack apps on your own infrastructure.

Installation

For JavaScript projects, install SST locally so the CLI version is tracked with your app. You can then run the CLI with the same package manager.

bash
npm install sst
# pnpm add sst
# bun add sst
# yarn add sst

If you are not using JavaScript, you can install the CLI globally.

bash
curl -fsSL https://sst.dev/install | bash

To install a specific version.

bash
curl -fsSL https://sst.dev/install | VERSION=0.0.403 bash

To use a package manager, check out our docs.

Manually

Download the pre-compiled binaries from the releases page and copy to the desired location.

Get Started

Get started with your favorite framework:

Learn More

Learn more about some of the key concepts:

Contributing

Here's how you can contribute:

  • Help us improve our docs
  • Find a bug? Open an issue
  • Feature request? Submit a PR

Running Locally

Run bun run setup. You need Go and Bun installed.

Now you can run the CLI locally on any of the examples/ apps.

bash
cd examples/aws-api
go run ../../cmd/sst <command>

If you want to build the CLI binary, run bun run build:cli. This will create a sst binary that you can use.

For building the docs, run bun run docs:generate and bun run docs:dev.


Join our community Discord | YouTube | X.com


File: CLAUDE.md

Layout

  • platform/ — TS Pulumi components embedded via //go:embed (platform/platform.go:16)
  • examples/ — sample apps
  • cmd/sst/ — Go CLI entry, orchestrates everything
  • cmd/sst/mosaic/ — live dev TUI
  • pkg/server/ — JSON-RPC bridge for custom Pulumi dynamic providers (rpc/rpc.ts ↔ pkg/server)
  • pkg/bus/ — pub/sub event bus
  • sdk/js/ — runtime SDK for reading linked resources
  • www/ — docs site (auto-generated from JSDoc comments in platform and extracted from the Go CLI)

Commands

  • Setup: bun run setup
  • Build platform: bun run build:platform
  • Build CLI: bun run build:cli
  • Run CLI locally: cd examples/<app> && go run ../../cmd/sst <command>
  • Go tests: bun run test:cli
  • Typecheck: bun run typecheck
  • Generate docs: bun run docs:generate
  • Run docs locally: bun run docs:dev

Verification

  1. Build the platform
  2. cd examples/<app> && bun install
  3. go run ../../cmd/sst deploy
  4. Verify with curl or AWS CLI
  5. Don't clean up unless told to
  6. sst dev --mode=basic for dev mode

File: package.json

{
"name": "sst",
"workspaces": [
"www",
"platform",
"sdk/js"
],
"scripts": {
"setup": "bun install && go mod tidy && bun run build:platform && bun run build:sdk",
"build:platform": "bun run --filter @sst/platform build",
"build:cli": "go build ./cmd/sst",
"build:sdk": "bun run --cwd ./sdk/js build",
"test:cli": "go test ./...",
"typecheck": "bun run typecheck:platform && bun run typecheck:sdk",
"typecheck:platform": "tsc --noEmit -p platform/tsconfig.json",
"typecheck:sdk": "tsc --noEmit -p sdk/js/tsconfig.json",
"docs:generate": "bun run --filter www generate",
"docs:dev": "bun run --filter www dev"
},
"overrides": {
"google-protobuf": "3.21.2"
}
}


File: .goreleaser.yml

version: 2
project_name: sst
builds:

  • env:
    • CGO_ENABLED=0
      goos:
    • linux
    • darwin
    • windows
      main: ./cmd/sst

archives:

  • formats:
    • tar.gz
      name_template: >-
      sst-
      {{- if eq .Os "darwin" }}mac-
      {{- else if eq .Os "windows" }}windows-
      {{- else if eq .Os "linux" }}linux-{{end}}
      {{- if eq .Arch "amd64" }}x86_64
      {{- else if eq .Arch "#86" }}i386
      {{- else }}{{ .Arch }}{{ end }}
      {{- if .Arm }}v{{ .Arm }}{{ end }}
      format_overrides:
    • goos: windows
      formats:
      • zip

checksum:
name_template: "checksums.txt"
snapshot:
version_template: "0.0.0-{{ .Timestamp }}"
aurs:

  • homepage: "https://github.com/sst/sst"
    private_key: "{{ .Env.AUR_KEY }}"
    git_url: "ssh://[email protected]/sst-bin.git"
    license: "MIT"
    package: |-
    install -Dm755 ./sst "${pkgdir}/usr/bin/sst"
    brews:
  • repository:
    owner: sst
    name: homebrew-tap
    nfpms:
  • maintainer: sst
    formats:
    • deb
    • rpm
      file_name_template: >-
      {{ .ProjectName }}-
      {{- if eq .Os "darwin" }}mac
      {{- else }}{{ .Os }}{{ end }}-{{ .Arch }}

changelog:
use: git
format: "[{{ .SHA }}](https://github.com/anomalyco/sst/commit/{{ .SHA }}): {{ .Message }}"
sort: asc
filters:
exclude:
- "^docs:"
- "^doc:"
- "^test:"
- "^ci:"
- "^ignore:"
- "^example:"
- "^wip:"


File: examples/tsconfig.json

{}


File: examples/aws-analog/angular.json

{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"my-app": {
"projectType": "application",
"root": ".",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@analogjs/platform:vite",
"options": {
"configFile": "vite.config.ts",
"main": "src/main.ts",
"outputPath": "dist/client",
"tsConfig": "tsconfig.app.json"
},
"defaultConfiguration": "production",
"configurations": {
"development": {
"mode": "development"
},
"production": {
"sourcemap": false,
"mode": "production"
}
}
},
"serve": {
"builder": "@analogjs/platform:vite-dev-server",
"defaultConfiguration": "development",
"options": {
"buildTarget": "my-app:build",
"port": 5173
},
"configurations": {
"development": {
"buildTarget": "my-app:build:development",
"hmr": true
},
"production": {
"buildTarget": "my-app:build:production"
}
}
},
"test": {
"builder": "@analogjs/vitest-angular:test"
}
}
}
}
}


File: examples/aws-analog/package.json

{
"name": "aws-analog",
"version": "0.0.0",
"type": "module",
"engines": {
"node": ">=18.19.1"
},
"scripts": {
"build": "ng build",
"dev": "ng serve",
"ng": "ng",
"start": "npm run dev",
"test": "ng test",
"watch": "ng build --watch --configuration development"
},
"private": true,
"dependencies": {
"@analogjs/content": "^1.8.1",
"@analogjs/router": "^1.8.1",
"@angular/animations": "^18.0.0",
"@angular/build": "^18.0.0",
"@angular/common": "^18.0.0",
"@angular/compiler": "^18.0.0",
"@angular/core": "^18.0.0",
"@angular/forms": "^18.0.0",
"@angular/platform-browser": "^18.0.0",
"@angular/platform-browser-dynamic": "^18.0.0",
"@angular/platform-server": "^18.0.0",
"@angular/router": "^18.0.0",
"@aws-sdk/client-s3": "^3.654.0",
"@aws-sdk/s3-request-presigner": "^3.654.0",
"front-matter": "^4.0.2",
"marked": "^5.0.2",
"marked-gfm-heading-id": "^3.1.0",
"marked-highlight": "^2.0.1",
"marked-mangle": "^1.1.7",
"prismjs": "^1.29.0",
"rxjs": "~7.8.0",
"sst": "file:../../sdk/js",
"tslib": "^2.3.0",
"zone.js": "~0.14.3"
},
"devDependencies": {
"@analogjs/platform": "^1.8.1",
"@analogjs/vite-plugin-angular": "^1.8.1",
"@analogjs/vitest-angular": "^1.8.1",
"@angular/cli": "^18.0.0",
"@angular/compiler-cli": "^18.0.0",
"jsdom": "^22.0.0",
"typescript": "~5.4.2",
"vite": "^5.0.0",
"vite-tsconfig-paths": "^4.2.0",
"vitest": "^1.3.1"
}
}


File: examples/aws-analog/tsconfig.app.json

/* To learn more about this file see: https://angular.io/config/tsconfig. /
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": []
},
"files": ["src/main.ts", "src/main.server.ts"],
"include": [
"src/**/
.d.ts",
"src/app/pages//*.page.ts",
"src/server/middleware/
/*.ts"
]
}


File: examples/aws-analog/tsconfig.json

/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "ES2022",
"module": "ES2022",
"lib": ["ES2022", "dom"],
"useDefineForClassFields": false,
"skipLibCheck": true
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
}
}


File: examples/aws-analog/tsconfig.spec.json

/* To learn more about this file see: https://angular.io/config/tsconfig. /
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/spec",
"target": "es2016",
"types": ["node", "vitest/globals"]
},
"files": ["src/test-setup.ts"],
"include": ["src/**/
.spec.ts", "src/**/*.d.ts"]
}


File: examples/aws-angular/angular.json

{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"aws-angular": {
"projectType": "application",
"schematics": {},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@ngx-env/builder:application",
"options": {
"outputPath": "dist/aws-angular",
"index": "src/index.html",
"browser": "src/main.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "tsconfig.app.json",
"assets": [
{
"glob": "/*",
"input": "public"
}
],
"styles": [
"src/styles.css"
],
"scripts": []
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kB",
"maximumError": "1MB"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kB",
"maximumError": "4kB"
}
],
"outputHashing": "all"
},
"development": {
"optimization": false,
"extractLicenses": false,
"sourceMap": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@ngx-env/builder:dev-server",
"configurations": {
"production": {
"buildTarget": "aws-angular:build:production"
},
"development": {
"buildTarget": "aws-angular:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@ngx-env/builder:extract-i18n"
},
"test": {
"builder": "@ngx-env/builder:karma",
"options": {
"polyfills": [
"zone.js",
"zone.js/testing"
],
"tsConfig": "tsconfig.spec.json",
"assets": [
{
"glob": "
/*",
"input": "public"
}
],
"styles": [
"src/styles.css"
],
"scripts": []
}
}
}
}
}
}


File: examples/aws-angular/package.json

{
"name": "aws-angular",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
"private": true,
"dependencies": {
"@angular/animations": "^18.2.0",
"@angular/common": "^18.2.0",
"@angular/compiler": "^18.2.0",
"@angular/core": "^18.2.0",
"@angular/forms": "^18.2.0",
"@angular/platform-browser": "^18.2.0",
"@angular/platform-browser-dynamic": "^18.2.0",
"@angular/router": "^18.2.0",
"@aws-sdk/client-s3": "^3.637.0",
"@aws-sdk/s3-request-presigner": "^3.637.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.14.10"
},
"devDependencies": {
"@angular-devkit/build-angular": "^18.2.2",
"@angular/cli": "^18.2.2",
"@angular/compiler-cli": "^18.2.0",
"@ngx-env/builder": "^18.0.1",
"@types/jasmine": "~5.1.0",
"jasmine-core": "~5.2.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"sst": "file:../../sdk/js",
"typescript": "~5.5.2"
}
}


File: examples/aws-angular/tsconfig.app.json

/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. /
/
To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. /
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": []
},
"files": [
"src/main.ts"
],
"include": [
"src/**/
.d.ts"
]
}


File: examples/aws-angular/tsconfig.json

/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. /
/
To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"skipLibCheck": true,
"isolatedModules": true,
"esModuleInterop": true,
"sourceMap": true,
"declaration": false,
"experimentalDecorators": true,
"moduleResolution": "bundler",
"importHelpers": true,
"target": "ES2022",
"module": "ES2022",
"lib": [
"ES2022",
"dom"
]
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
}
}


File: examples/aws-angular/tsconfig.spec.json

/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. /
/
To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. /
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/spec",
"types": [
"jasmine"
]
},
"include": [
"src/**/
.spec.ts",
"src/**/*.d.ts"
]
}


File: examples/aws-api/package.json

{
"name": "aws-api",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@aws-sdk/client-s3": "^3.540.0",
"@aws-sdk/s3-request-presigner": "^3.540.0",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "8.10.142"
}
}


File: examples/aws-api/tsconfig.json

{}


File: examples/aws-apig-auth/package.json

{
"name": "aws-apig-auth",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-apig-websocket/package.json

{
"name": "aws-apig-websocket",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@aws-sdk/client-apigatewaymanagementapi": "^3.699.0",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-apig-websocket/tsconfig.json

{}


File: examples/aws-apigv1/package.json

{
"name": "aws-apigv1",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@aws-sdk/client-s3": "^3.540.0",
"@aws-sdk/s3-request-presigner": "^3.540.0",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-apigv1/tsconfig.json

{}


File: examples/aws-apigv1-stream/package.json

{
"name": "aws-apigv1-stream",
"version": "1.0.0",
"dependencies": {
"@types/aws-lambda": "^8.10.161",
"hono": "^4",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-apigv1-stream/tsconfig.json

{
"compilerOptions": {
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true
}
}


File: examples/aws-app-sync/package.json

{
"name": "aws-app-sync",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-astro/package.json

{
"name": "aws-astro",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/check": "^0.5.10",
"@aws-sdk/client-s3": "^3.540.0",
"@aws-sdk/s3-request-presigner": "^3.540.0",
"astro": "^4.5.9",
"astro-sst": "^2.41.2",
"sst": "file:../../sdk/js",
"typescript": "^5.4.3"
}
}


File: examples/aws-astro/tsconfig.json

{
"extends": "astro/tsconfigs/strict"
}


File: examples/aws-astro-container/package.json

{
"name": "aws-astro-container",
"type": "module",
"version": "0.0.1",
"scripts": {
"astro": "astro",
"build": "astro check && astro build",
"dev": "astro dev",
"preview": "astro preview"
},
"dependencies": {
"@astrojs/check": "^0.9.4",
"@astrojs/node": "^8.3.4",
"@aws-sdk/client-s3": "^3.701.0",
"@aws-sdk/s3-request-presigner": "^3.701.0",
"astro": "^4.16.16",
"astro-sst": "2.43.5",
"sst": "file:../../sdk/js",
"typescript": "^5.7.2"
}
}


File: examples/aws-astro-container/tsconfig.json

{
"extends": "astro/tsconfigs/strict",
"include": [
".astro/types.d.ts",
"**/*"
],
"exclude": [
"dist","sst.config.ts"
]
}


File: examples/aws-astro-redis/package.json

{
"name": "aws-astro-redis",
"type": "module",
"version": "0.0.1",
"scripts": {
"astro": "astro",
"build": "astro check && astro build",
"dev": "astro dev",
"preview": "astro preview",
"start": "astro dev"
},
"dependencies": {
"@astrojs/check": "^0.9.4",
"@astrojs/node": "^8.3.4",
"astro": "^4.16.3",
"astro-sst": "2.43.5",
"ioredis": "^5.4.1",
"sst": "file:../../sdk/js",
"typescript": "^5.6.3"
}
}


File: examples/aws-astro-redis/tsconfig.json

{
"extends": "astro/tsconfigs/strict",
"exclude": ["sst.config.ts"]
}


File: examples/aws-astro-stream/package.json

{
"name": "aws-astro-stream",
"type": "module",
"version": "0.0.1",
"scripts": {
"astro": "astro",
"build": "astro check && astro build",
"dev": "astro dev",
"preview": "astro preview",
"start": "astro dev"
},
"dependencies": {
"@astrojs/check": "^0.9.3",
"astro": "^4.15.9",
"astro-sst": "2.43.5",
"sst": "file:../../sdk/js",
"typescript": "^5.6.2"
}
}


File: examples/aws-astro-stream/tsconfig.json

{
"extends": "astro/tsconfigs/strict"
}


File: examples/aws-aurora-local/package.json

{
"name": "aws-aurora-local",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"postgres": "^3.4.5",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-aurora-local/tsconfig.json

{}


File: examples/aws-aurora-mysql/package.json

{
"name": "aws-aurora-mysql",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"mysql2": "^3.12.0",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-aurora-postgres/package.json

{
"name": "aws-aurora-postgres",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"postgres": "^3.4.5",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-auth-nextjs/package.json

{
"name": "aws-auth-nextjs",
"version": "0.1.0",
"private": true,
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
},
"dependencies": {
"@openauthjs/openauth": "latest",
"hono": "^4.6.16",
"next": "15.1.4",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"sst": "file:../../sdk/js",
"valibot": "^1.0.0-beta.11"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"typescript": "^5"
}
}


File: examples/aws-auth-nextjs/tsconfig.json

{
"compilerOptions": {
"target": "ES2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/": ["./"]
}
},
"include": ["next-env.d.ts", "/*.ts", "/.tsx", ".next/types/**/.ts"],
"exclude": ["node_modules", "sst.config.ts"]
}


File: examples/aws-auth-react/package.json

{
"name": "aws-auth-react",
"version": "0.0.0",
"workspaces": [
"packages/*"
],
"scripts": {},
"devDependencies": {
"@tsconfig/node22": "^22",
"typescript": "^5"
},
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-auth-react/tsconfig.json

{}


File: examples/aws-auth-react/packages/core/package.json

{
"name": "@aws-auth-react/core",
"type": "module",
"version": "0.0.0",
"scripts": {
"test": "sst shell vitest"
},
"exports": {
"./": [
"./src/
/index.ts",
"./src/*.ts"
]
},
"dependencies": {
"sst": "file:../../../../sdk/js"
},
"devDependencies": {
"vitest": "^2"
}
}


File: examples/aws-auth-react/packages/core/tsconfig.json

{
"extends": "@tsconfig/node22/tsconfig.json",
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "Bundler",
},
}


File: examples/aws-auth-react/packages/functions/package.json

{
"name": "@aws-auth-react/functions",
"version": "0.0.0",
"type": "module",
"dependencies": {
"@aws-auth-react/core": "*",
"@openauthjs/openauth": "^0.3.6",
"hono": "^4.6.18",
"sst": "file:../../../../sdk/js",
"valibot": "^1.0.0-beta.14"
},
"devDependencies": {
"@types/aws-lambda": "^8"
}
}


File: examples/aws-auth-react/packages/functions/tsconfig.json

{
"extends": "@tsconfig/node22/tsconfig.json",
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "Bundler",
},
}


File: examples/aws-auth-react/packages/scripts/package.json

{
"name": "@aws-auth-react/scripts",
"version": "0.0.0",
"type": "module",
"dependencies": {
"@aws-auth-react/core": "*",
"sst": "file:../../../../sdk/js"
},
"scripts": {
"shell": "sst shell tsx"
},
"devDependencies": {
"@types/node": "^22",
"tsx": "^4"
}
}


File: examples/aws-auth-react/packages/scripts/tsconfig.json

{
"extends": "@tsconfig/node22/tsconfig.json",
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "Bundler",
},
}


File: examples/aws-auth-react/packages/web/package.json

{
"name": "web",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview"
},
"dependencies": {
"@openauthjs/openauth": "^0.3.8",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@eslint/js": "^9.17.0",
"@types/react": "^18.3.18",
"@types/react-dom": "^18.3.5",
"@vitejs/plugin-react": "^4.3.4",
"eslint": "^9.17.0",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.16",
"globals": "^15.14.0",
"typescript": "~5.6.2",
"typescript-eslint": "^8.18.2",
"vite": "^6.0.5"
}
}


File: examples/aws-auth-react/packages/web/tsconfig.app.json

{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,

text
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
"jsx": "react-jsx",

/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true

},
"include": ["src"]
}


File: examples/aws-auth-react/packages/web/tsconfig.json

{
"files": [],
"references": [
{ "path": "./tsconfig.app.json" },
{ "path": "./tsconfig.node.json" }
]
}


File: examples/aws-auth-react/packages/web/tsconfig.node.json

{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"target": "ES2022",
"lib": ["ES2023"],
"module": "ESNext",
"skipLibCheck": true,

text
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,

/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true

},
"include": ["vite.config.ts"]
}


File: examples/aws-base/package.json

{
"name": "aws-base",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-base/tsconfig.json

{}


File: examples/aws-bucket-lifecycle-rules/package.json

{
"name": "aws-bucket-lifecycle-rules",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-bucket-policy/package.json

{
"name": "aws-bucket-policy",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-bucket-queue-subscriber/package.json

{
"name": "aws-bucket-queue-subscriber",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "index.js",
"scripts": {
"deploy": "go run ../../cmd/sst deploy",
"remove": "go run ../../cmd/sst remove",
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@types/aws-lambda": "^8.10.149",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-bucket-subscriber/package.json

{
"name": "aws-bucket-subscriber",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-bucket-topic-subscriber/package.json

{
"name": "aws-bucket-topic-subscriber",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-bun/package.json

{
"name": "aws-bun",
"module": "index.ts",
"type": "module",
"scripts": {
"dev": "bun run --watch index.ts"
},
"devDependencies": {
"@types/aws-lambda": "8.10.145",
"@types/bun": "latest"
},
"peerDependencies": {
"typescript": "^5.0.0"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.658.1",
"@aws-sdk/lib-storage": "^3.658.1",
"@aws-sdk/s3-request-presigner": "^3.658.1",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-bun/tsconfig.json

{
"compilerOptions": {
// Enable latest features
"lib": ["ESNext", "DOM"],
"target": "ESNext",
"module": "ESNext",
"moduleDetection": "force",
"jsx": "react-jsx",
"allowJs": true,

text
// Bundler mode
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"noEmit": true,

// Best practices
"strict": true,
"skipLibCheck": true,
"noFallthroughCasesInSwitch": true,

// Some stricter flags (disabled by default)
"noUnusedLocals": false,
"noUnusedParameters": false,
"noPropertyAccessFromIndexSignature": false

}
}


File: examples/aws-bun-elysia/package.json

{
"name": "aws-bun-elysia",
"version": "1.0.50",
"scripts": {
"dev": "bun run --watch src/index.ts",
"test": "echo "Error: no test specified" && exit 1"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.658.1",
"@aws-sdk/lib-storage": "^3.658.1",
"@aws-sdk/s3-request-presigner": "^3.658.1",
"elysia": "latest",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "8.10.145",
"bun-types": "latest"
},
"module": "src/index.js"
}


File: examples/aws-bun-elysia/tsconfig.json

{}


File: examples/aws-bun-redis/package.json

{
"name": "aws-bun-redis",
"module": "index.ts",
"type": "module",
"scripts": {
"build": "bun build --target bun index.ts",
"dev": "bun run --watch index.ts"
},
"devDependencies": {
"@types/aws-lambda": "8.10.145",
"@types/bun": "latest"
},
"peerDependencies": {
"typescript": "^5.0.0"
},
"dependencies": {
"ioredis": "^5.4.1",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-bun-redis/tsconfig.json

{
"compilerOptions": {
// Enable latest features
"lib": ["ESNext", "DOM"],
"target": "ESNext",
"module": "ESNext",
"moduleDetection": "force",
"jsx": "react-jsx",
"allowJs": true,

text
// Bundler mode
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"noEmit": true,

// Best practices
"strict": true,
"skipLibCheck": true,
"noFallthroughCasesInSwitch": true,

// Some stricter flags (disabled by default)
"noUnusedLocals": false,
"noUnusedParameters": false,
"noPropertyAccessFromIndexSignature": false

}
}


File: examples/aws-bundle/package.json

{
"name": "aws-bundle",
"version": "0.0.0",
"type": "module",
"dependencies": {
"@types/node": "^22.13.2",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-bundle/tsconfig.json

{}


File: examples/aws-bundle/src/file.json

{ "test": "foo" }


File: examples/aws-bus/package.json

{
"name": "aws-bus",
"version": "0.0.0",
"dependencies": {
"@aws-sdk/client-eventbridge": "^3.582.0",
"sst": "file:../../sdk/js",
"zod": "^4.1.13"
},
"devDependencies": {
"typescript": "^5.9.3"
}
}


File: examples/aws-bus/tsconfig.json

{
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "Bundler"
}
}


File: examples/aws-cloudflare-combined/package.json

{
"name": "aws-cloudflare-combined",
"type": "module",
"dependencies": {
"@aws-sdk/client-s3": "^3.701.0",
"@aws-sdk/s3-request-presigner": "^3.701.0",
"@cloudflare/workers-types": "^4.20240403.0",
"hono": "^4.6.12",
"sst": "../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "8.10.146"
}
}


File: examples/aws-cloudflare-combined/tsconfig.json

{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Bundler",
"strict": true,
"skipLibCheck": true,
"types": ["node"]
}
}


File: examples/aws-cluster-autoscaling/package.json

{
"name": "aws-cluster-autoscaling",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"@aws-sdk/client-sqs": "^3.682.0",
"express": "^4.21.1",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-cluster-internal/package.json

{
"name": "aws-cluster-internal",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"express": "^4.21.1"
}
}


File: examples/aws-cluster-spot/package.json

{
"name": "aws-cluster-spot",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"express": "^4.21.1",
"sst": "file:../../sdk/js"
}
}


{
"name": "aws-cluster-vpclink",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"express": "^4.21.1"
}
}


File: examples/aws-cognito/package.json

{
"name": "aws-cognito",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-copy-files/package.json

{
"name": "aws-copy-files",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-copy-files/tsconfig.json

{}


File: examples/aws-copy-files/files/foo.json

{
"foo": "bar"
}


File: examples/aws-dart-api/analysis_options.yaml

This file configures the static analysis results for your project (errors,

warnings, and lints).

This set helps identify many issues that may lead to problems when running

or consuming Dart code, and enforces writing Dart using a single, idiomatic

style and format.

If you want a smaller set of lints you can change this to specify

'package:lints/core.yaml'. These are just the most critical lints

The core lints are also what is used by pub.dev for scoring packages.

include: package:lints/recommended.yaml

Uncomment the following section to specify additional rules.

linter:

rules:

- camel_case_types

analyzer:

exclude:

- path/to/excluded/files/**

https://dart.dev/go/core-lints

For additional information about configuring this file, see

https://dart.dev/guides/language/analysis-options


File: examples/aws-dart-api/CHANGELOG.md

1.0.0

  • Initial version.

File: examples/aws-dart-api/pubspec.yaml

name: aws_dart_api
version: 1.0.0
publish_to: none

environment:
sdk: ^3.4.0

dependencies:
aws_lambda_dart_runtime:
git:
url: https://github.com/katallaxie/aws-lambda-dart-runtime

dev_dependencies:
lints: ^3.0.0
test: ^1.24.0


File: examples/aws-dead-letter-queue/package.json

{
"name": "aws-dead-letter-queue",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "index.js",
"scripts": {
"deploy": "go run ../../cmd/sst deploy",
"remove": "go run ../../cmd/sst remove",
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@types/aws-lambda": "^8.10.149",
"sst": "file:../../sdk/js"
},
"dependencies": {
"@aws-sdk/client-sqs": "^3.515.0"
}
}


File: examples/aws-deno/deno.json

{
"tasks": {
"dev": "deno run --allow-all --watch main.ts"
},
"imports": {
"@aws-sdk/client-s3": "npm:@aws-sdk/client-s3@^3.705.0",
"@aws-sdk/lib-storage": "npm:@aws-sdk/lib-storage@^3.705.0",
"@aws-sdk/s3-request-presigner": "npm:@aws-sdk/s3-request-presigner@^3.705.0",
"@std/assert": "jsr:@std/assert@1",
"sst": "npm:sst@latest"
}
}


File: examples/aws-deno-redis/deno.json

{
"tasks": {
"dev": "deno run --watch --allow-all main.ts"
},
"imports": {
"@std/assert": "jsr:@std/assert@1",
"ioredis": "npm:ioredis@^5.4.1",
"sst": "npm:sst@latest"
}
}


File: examples/aws-drizzle/package.json

{
"name": "aws-drizzle",
"version": "0.0.0",
"type": "module",
"scripts": {
"db": "sst shell drizzle-kit"
},
"dependencies": {
"@types/aws-lambda": "^8.10.142",
"@types/pg": "^8.11.10",
"drizzle-kit": "^0.26.2",
"drizzle-orm": "^0.35.1",
"pg": "^8.13.0",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-drizzle/tsconfig.json

{
"compilerOptions": {
"strict": true
}
}


File: examples/aws-drizzle/migrations/meta/0000_snapshot.json

{
"id": "89cd0e0e-59a6-42ec-a876-c44671efc130",
"prevId": "00000000-0000-0000-0000-000000000000",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.todo": {
"name": "todo",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": true
},
"description": {
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
}
},
"enums": {},
"schemas": {},
"sequences": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
}


File: examples/aws-drizzle/migrations/meta/_journal.json

{
"version": "7",
"dialect": "postgresql",
"entries": [
{
"idx": 0,
"version": "7",
"when": 1729181504948,
"tag": "0000_lethal_justin_hammer",
"breakpoints": true
}
]
}


File: examples/aws-drizzle-migrations/package.json

{
"name": "aws-drizzle-migrations",
"version": "0.0.0",
"type": "module",
"scripts": {
"db": "sst shell drizzle-kit"
},
"dependencies": {
"@types/aws-lambda": "^8.10.142",
"@types/pg": "^8.11.10",
"drizzle-kit": "^0.26.2",
"drizzle-orm": "^0.35.1",
"pg": "^8.13.0",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-drizzle-migrations/tsconfig.json

{
"compilerOptions": {
"strict": true
}
}


File: examples/aws-drizzle-migrations/migrations/meta/0000_snapshot.json

{
"id": "89cd0e0e-59a6-42ec-a876-c44671efc130",
"prevId": "00000000-0000-0000-0000-000000000000",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.todo": {
"name": "todo",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": true
},
"description": {
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
}
},
"enums": {},
"schemas": {},
"sequences": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
}


File: examples/aws-drizzle-migrations/migrations/meta/_journal.json

{
"version": "7",
"dialect": "postgresql",
"entries": [
{
"idx": 0,
"version": "7",
"when": 1729181504948,
"tag": "0000_lethal_justin_hammer",
"breakpoints": true
}
]
}


File: examples/aws-dsql/package.json

{
"name": "aws-dsql",
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "sst dev",
"deploy": "sst deploy",
"remove": "sst remove"
},
"dependencies": {
"@aws-sdk/credential-providers": "^3.844.0",
"@aws/aurora-dsql-node-postgres-connector": "^0.1.8",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "^8.10.133",
"@types/pg": "^8.10.9"
}
}


File: examples/aws-dsql-drizzle/package.json

{
"name": "aws-dsql-drizzle",
"version": "0.0.0",
"type": "module",
"scripts": {
"db": "sst shell drizzle-kit"
},
"dependencies": {
"@aws-sdk/credential-providers": "^3.844.0",
"@aws-sdk/dsql-signer": "^3.844.0",
"@aws/aurora-dsql-node-postgres-connector": "^0.1.8",
"@types/aws-lambda": "^8.10.142",
"@types/pg": "^8.11.10",
"drizzle-kit": "^0.26.2",
"drizzle-orm": "^0.35.1",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-dsql-drizzle/tsconfig.json

{
"compilerOptions": {
"strict": true
}
}


File: examples/aws-dsql-multiregion/package.json

{
"name": "aws-dsql-multiregion",
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "sst dev",
"deploy": "sst deploy",
"remove": "sst remove"
},
"dependencies": {
"@aws-sdk/credential-providers": "^3.844.0",
"@aws/aurora-dsql-node-postgres-connector": "^0.1.8",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "^8.10.133",
"@types/pg": "^8.10.9"
}
}


File: examples/aws-dsql-vpc/package.json

{
"name": "aws-dsql-vpc",
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "sst dev",
"deploy": "sst deploy",
"remove": "sst remove"
},
"dependencies": {
"@aws-sdk/credential-providers": "^3.844.0",
"@aws/aurora-dsql-node-postgres-connector": "^0.1.8",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "^8.10.133",
"@types/pg": "^8.10.9"
}
}


File: examples/aws-dynamo/package.json

{
"name": "aws-dynamo",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "index.js",
"scripts": {
"deploy": "go run ../../cmd/sst deploy",
"remove": "go run ../../cmd/sst remove",
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"sst": "file:../../sdk/js"
},
"dependencies": {
"@aws-sdk/client-dynamodb": "^3.515.0"
}
}


File: examples/aws-dynamo-composite-keys/package.json

{
"name": "aws-dynamo-composite-keys",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "index.js",
"scripts": {
"deploy": "go run ../../cmd/sst deploy",
"remove": "go run ../../cmd/sst remove",
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"sst": "file:../../sdk/js"
},
"dependencies": {
"@aws-sdk/client-dynamodb": "^3.515.0"
}
}


File: examples/aws-ec2-pulumi/package.json

{
"name": "aws-ec2-pulumi",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "index.js",
"scripts": {
"deploy": "go run ../../cmd/sst deploy",
"remove": "go run ../../cmd/sst remove",
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"sst": "file:../../sdk/js"
},
"dependencies": {
}
}


File: examples/aws-efs/package.json

{
"name": "aws-efs",
"version": "1.0.0",
"description": "",
"main": "index.js",
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.19.2"
}
}


File: examples/aws-efs-sqlite/package.json

{
"name": "aws-efs-sqlite",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"better-sqlite3": "^11.4.0"
}
}


File: examples/aws-efs-sqlite/tsconfig.json

{}


File: examples/aws-efs-surrealdb/package.json

{
"name": "aws-efs-surrealdb",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"sst": "file:../../sdk/js",
"surrealdb": "^1.0.1"
}
}


File: examples/aws-efs-surrealdb/tsconfig.json

{}


File: examples/aws-email/package.json

{
"name": "aws-email",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@aws-sdk/client-sesv2": "^3.515.0",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "8.10.142"
}
}


File: examples/aws-email/tsconfig.json

{}


File: examples/aws-email-domain/package.json

{
"name": "aws-email-domain",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@aws-sdk/client-sesv2": "^3.515.0",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "8.10.142"
}
}


File: examples/aws-email-domain/tsconfig.json

{}


File: examples/aws-express/package.json

{
"name": "aws-express",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@aws-sdk/client-s3": "^3.705.0",
"@aws-sdk/lib-storage": "^3.705.0",
"@aws-sdk/s3-request-presigner": "^3.705.0",
"express": "^4.21.1",
"multer": "^1.4.5-lts.1",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "8.10.146"
}
}


File: examples/aws-express/tsconfig.json

{}


File: examples/aws-express-redis/package.json

{
"name": "aws-express-redis",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.21.0",
"ioredis": "^5.4.1",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "8.10.145"
}
}


File: examples/aws-express-redis/tsconfig.json

{}


File: examples/aws-fastapi/package.json

{
"name": "aws-fastapi",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-fastapi/tsconfig.json

{}


File: examples/aws-ffmpeg/package.json

{
"name": "aws-ffmpeg",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"ffmpeg-static": "^5.2.0",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "8.10.145"
}
}


File: examples/aws-ffmpeg/tsconfig.json

{
"compilerOptions": {
"esModuleInterop": true
}
}


File: examples/aws-flutter-web/analysis_options.yaml

This file configures the analyzer, which statically analyzes Dart code to

check for errors, warnings, and lints.

The issues identified by the analyzer are surfaced in the UI of Dart-enabled

IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be

invoked from the command line by running `flutter analyze`.

packages, and plugins designed to encourage good coding practices.

include: package:flutter_lints/flutter.yaml

linter:

The lint rules applied to this project can be customized in the

section below to disable rules from the `package:flutter_lints/flutter.yaml`

included above or to enable additional rules. A list of all available lints

and their documentation is published at https://dart.dev/lints.

Instead of disabling a lint rule for the entire project in the

section below, it can also be suppressed for a single line of code

or a specific dart file by using the `// ignore: name_of_lint` and

`// ignore_for_file: name_of_lint` syntax on the line or in the file

producing the lint.

rules:
# avoid_print: false # Uncomment to disable the avoid_print rule
# prefer_single_quotes: true # Uncomment to enable the prefer_single_quotes rule

Additional information about this file can be found at

https://dart.dev/guides/language/analysis-options


File: examples/aws-flutter-web/pubspec.yaml

name: aws_flutter_web

The following line prevents the package from being accidentally published to

pub.dev using `flutter pub publish`. This is preferred for private packages.

publish_to: 'none' # Remove this line if you wish to publish to pub.dev

The following defines the version and build number for your application.

A version number is three numbers separated by dots, like 1.2.43

followed by an optional build number separated by a +.

Both the version and the builder number may be overridden in flutter

build by specifying --build-name and --build-number, respectively.

In Android, build-name is used as versionName while build-number used as versionCode.

Read more about Android versioning at https://developer.android.com/studio/publish/versioning

In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.

Read more about iOS versioning at

https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html

In Windows, build-name is used as the major, minor, and patch parts

of the product and file versions while build-number is used as the build suffix.

version: 1.0.0+1

environment:
sdk: '>=3.4.1 <4.0.0'

Dependencies specify other packages that your package needs in order to work.

To automatically upgrade your package dependencies to the latest versions

consider running `flutter pub upgrade --major-versions`. Alternatively,

dependencies can be manually updated by changing the version numbers below to

the latest version available on pub.dev. To see which dependencies have newer

versions available, run `flutter pub outdated`.

dependencies:
flutter:
sdk: flutter

The following adds the Cupertino Icons font to your application.

Use with the CupertinoIcons class for iOS style icons.

cupertino_icons: ^1.0.6

dev_dependencies:
flutter_test:
sdk: flutter

encourage good coding practices. The lint set provided by the package is

activated in the `analysis_options.yaml` file located at the root of your

package. See that file for information about deactivating specific lint

rules and activating additional ones.

flutter_lints: ^3.0.0

For information on the generic Dart part of this file, see the

following page: https://dart.dev/tools/pub/pubspec

The following section is specific to Flutter packages.

flutter:

The following line ensures that the Material Icons font is

included with your application, so that you can use the icons in

the material Icons class.

uses-material-design: true

To add assets to your application, add an assets section, like this:

assets:

- images/a_dot_burr.jpeg

- images/a_dot_ham.jpeg

An image asset can refer to one or more resolution-specific "variants", see

https://flutter.dev/assets-and-images/#resolution-aware

For details regarding adding assets from package dependencies, see

https://flutter.dev/assets-and-images/#from-packages

To add custom fonts to your application, add a fonts section here,

in this "flutter" section. Each entry in this list should have a

"family" key with the font family name, and a "fonts" key with a

list giving the asset and other descriptors for the font. For

example:

fonts:

- family: Schyler

fonts:

- asset: fonts/Schyler-Regular.ttf

- asset: fonts/Schyler-Italic.ttf

style: italic

- family: Trajan Pro

fonts:

- asset: fonts/TrajanPro.ttf

- asset: fonts/TrajanPro_Bold.ttf

weight: 700

For details regarding fonts from package dependencies,

see https://flutter.dev/custom-fonts/#from-packages


File: examples/aws-flutter-web/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json

{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "[email protected]",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}


File: examples/aws-flutter-web/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json

{
"images" : [
{
"idiom" : "universal",
"filename" : "LaunchImage.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}


File: examples/aws-flutter-web/linux/CMakeLists.txt

Project-level configuration.

cmake_minimum_required(VERSION 3.10)
project(runner LANGUAGES CXX)

The name of the executable created for the application. Change this to change

the on-disk name of your application.

set(BINARY_NAME "aws_flutter_web")

The unique GTK application identifier for this application. See:

https://wiki.gnome.org/HowDoI/ChooseApplicationID

set(APPLICATION_ID "com.example.aws_flutter_web")

Explicitly opt in to modern CMake behaviors to avoid warnings with recent

versions of CMake.

cmake_policy(SET CMP0063 NEW)

Load bundled libraries from the lib/ directory relative to the binary.

set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")

Root filesystem for cross-building.

if(FLUTTER_TARGET_PLATFORM_SYSROOT)
set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT})
set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
endif()

Define build configuration options.

if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE "Debug" CACHE
STRING "Flutter build mode" FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Profile" "Release")
endif()

Compilation settings that should be applied to most targets.

Be cautious about adding new options here, as plugins use this function by

default. In most cases, you should add new options to specific targets instead

of modifying this function.

function(APPLY_STANDARD_SETTINGS TARGET)
target_compile_features(${TARGET} PUBLIC cxx_std_14)
target_compile_options(${TARGET} PRIVATE -Wall -Werror)
target_compile_options(${TARGET} PRIVATE "$<$<NOT:$CONFIG:Debug>:-O3>")
target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$CONFIG:Debug>:NDEBUG>")
endfunction()

Flutter library and tool build rules.

set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
add_subdirectory(${FLUTTER_MANAGED_DIR})

System-level dependencies.

find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)

add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")

Define the application target. To change its name, change BINARY_NAME above,

not the value here, or `flutter run` will no longer work.

Any new source files that you add to the application should be added here.

add_executable(${BINARY_NAME}
"main.cc"
"my_application.cc"
"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
)

Apply the standard set of build settings. This can be removed for applications

that need different build settings.

apply_standard_settings(${BINARY_NAME})

Add dependency libraries. Add any application-specific dependencies here.

target_link_libraries(${BINARY_NAME} PRIVATE flutter)
target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)

Run the Flutter tool portions of the build. This must not be removed.

add_dependencies(${BINARY_NAME} flutter_assemble)

Only the install-generated bundle's copy of the executable will launch

correctly, since the resources must in the right relative locations. To avoid

people trying to run the unbundled copy, put it in a subdirectory instead of

the default top-level location.

set_target_properties(${BINARY_NAME}
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run"
)

Generated plugin build rules, which manage building the plugins and adding

them to the application.

include(flutter/generated_plugins.cmake)

=== Installation ===

By default, "installing" just makes a relocatable bundle in the build

directory.

set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
endif()

Start with a clean build bundle directory every time.

install(CODE "
file(REMOVE_RECURSE "${BUILD_BUNDLE_DIR}/")
" COMPONENT Runtime)

set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")

install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
COMPONENT Runtime)

install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
COMPONENT Runtime)

install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)

foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
install(FILES "${bundled_library}"
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)
endforeach(bundled_library)

Copy the native assets provided by the build.dart from all packages.

set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/")
install(DIRECTORY "${NATIVE_ASSETS_DIR}"
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)

Fully re-copy the assets directory on each build to avoid having stale files

from a previous install.

set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
install(CODE "
file(REMOVE_RECURSE "${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}")
" COMPONENT Runtime)
install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)

Install the AOT library on non-Debug builds only.

if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)
endif()


File: examples/aws-flutter-web/linux/flutter/CMakeLists.txt

This file controls Flutter-level build steps. It should not be edited.

cmake_minimum_required(VERSION 3.10)

set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")

Configuration provided via flutter tool.

include(${EPHEMERAL_DIR}/generated_config.cmake)

TODO: Move the rest of this into files in ephemeral. See

https://github.com/flutter/flutter/issues/57146.

Serves the same purpose as list(TRANSFORM ... PREPEND ...),

which isn't available in 3.10.

function(list_prepend LIST_NAME PREFIX)
set(NEW_LIST "")
foreach(element ${${LIST_NAME}})
list(APPEND NEW_LIST "${PREFIX}${element}")
endforeach(element)
set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
endfunction()

=== Flutter Library ===

System-level dependencies.

find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)

set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")

Published to parent scope for install step.

set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)

list(APPEND FLUTTER_LIBRARY_HEADERS
"fl_basic_message_channel.h"
"fl_binary_codec.h"
"fl_binary_messenger.h"
"fl_dart_project.h"
"fl_engine.h"
"fl_json_message_codec.h"
"fl_json_method_codec.h"
"fl_message_codec.h"
"fl_method_call.h"
"fl_method_channel.h"
"fl_method_codec.h"
"fl_method_response.h"
"fl_plugin_registrar.h"
"fl_plugin_registry.h"
"fl_standard_message_codec.h"
"fl_standard_method_codec.h"
"fl_string_codec.h"
"fl_value.h"
"fl_view.h"
"flutter_linux.h"
)
list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
add_library(flutter INTERFACE)
target_include_directories(flutter INTERFACE
"${EPHEMERAL_DIR}"
)
target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
target_link_libraries(flutter INTERFACE
PkgConfig::GTK
PkgConfig::GLIB
PkgConfig::GIO
)
add_dependencies(flutter flutter_assemble)

=== Flutter tool backend ===

_phony_ is a non-existent file to force this command to run every time,

since currently there's no way to get a full input/output list from the

flutter tool.

add_custom_command(
OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
${CMAKE_CURRENT_BINARY_DIR}/phony
COMMAND ${CMAKE_COMMAND} -E env
${FLUTTER_TOOL_ENVIRONMENT}
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}
VERBATIM
)
add_custom_target(flutter_assemble DEPENDS
"${FLUTTER_LIBRARY}"
${FLUTTER_LIBRARY_HEADERS}
)


File: examples/aws-flutter-web/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json

{
"images" : [
{
"size" : "16x16",
"idiom" : "mac",
"filename" : "app_icon_16.png",
"scale" : "1x"
},
{
"size" : "16x16",
"idiom" : "mac",
"filename" : "app_icon_32.png",
"scale" : "2x"
},
{
"size" : "32x32",
"idiom" : "mac",
"filename" : "app_icon_32.png",
"scale" : "1x"
},
{
"size" : "32x32",
"idiom" : "mac",
"filename" : "app_icon_64.png",
"scale" : "2x"
},
{
"size" : "128x128",
"idiom" : "mac",
"filename" : "app_icon_128.png",
"scale" : "1x"
},
{
"size" : "128x128",
"idiom" : "mac",
"filename" : "app_icon_256.png",
"scale" : "2x"
},
{
"size" : "256x256",
"idiom" : "mac",
"filename" : "app_icon_256.png",
"scale" : "1x"
},
{
"size" : "256x256",
"idiom" : "mac",
"filename" : "app_icon_512.png",
"scale" : "2x"
},
{
"size" : "512x512",
"idiom" : "mac",
"filename" : "app_icon_512.png",
"scale" : "1x"
},
{
"size" : "512x512",
"idiom" : "mac",
"filename" : "app_icon_1024.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}


File: examples/aws-flutter-web/web/manifest.json

{
"name": "aws_flutter_web",
"short_name": "aws_flutter_web",
"start_url": ".",
"display": "standalone",
"background_color": "#0175C2",
"theme_color": "#0175C2",
"description": "A new Flutter project.",
"orientation": "portrait-primary",
"prefer_related_applications": false,
"icons": [
{
"src": "icons/Icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "icons/Icon-512.png",
"sizes": "512x512",
"type": "image/png"
},
{
"src": "icons/Icon-maskable-192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "icons/Icon-maskable-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
]
}


File: examples/aws-flutter-web/windows/CMakeLists.txt

Project-level configuration.

cmake_minimum_required(VERSION 3.14)
project(aws_flutter_web LANGUAGES CXX)

The name of the executable created for the application. Change this to change

the on-disk name of your application.

set(BINARY_NAME "aws_flutter_web")

Explicitly opt in to modern CMake behaviors to avoid warnings with recent

versions of CMake.

cmake_policy(VERSION 3.14...3.25)

Define build configuration option.

get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(IS_MULTICONFIG)
set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release"
CACHE STRING "" FORCE)
else()
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE "Debug" CACHE
STRING "Flutter build mode" FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Profile" "Release")
endif()
endif()

Define settings for the Profile build mode.

set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}")
set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}")

Use Unicode for all projects.

add_definitions(-DUNICODE -D_UNICODE)

Compilation settings that should be applied to most targets.

Be cautious about adding new options here, as plugins use this function by

default. In most cases, you should add new options to specific targets instead

of modifying this function.

function(APPLY_STANDARD_SETTINGS TARGET)
target_compile_features(${TARGET} PUBLIC cxx_std_17)
target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100")
target_compile_options(${TARGET} PRIVATE /EHsc)
target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0")
target_compile_definitions(${TARGET} PRIVATE "$<$CONFIG:Debug:_DEBUG>")
endfunction()

Flutter library and tool build rules.

set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
add_subdirectory(${FLUTTER_MANAGED_DIR})

Application build; see runner/CMakeLists.txt.

add_subdirectory("runner")

Generated plugin build rules, which manage building the plugins and adding

them to the application.

include(flutter/generated_plugins.cmake)

=== Installation ===

Support files are copied into place next to the executable, so that it can

run in place. This is done instead of making a separate bundle (as on Linux)

so that building and running from within Visual Studio will work.

set(BUILD_BUNDLE_DIR "$<TARGET_FILE_DIR:${BINARY_NAME}>")

Make the "install" step default, as it's required to run.

set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
endif()

set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}")

install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
COMPONENT Runtime)

install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
COMPONENT Runtime)

install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)

if(PLUGIN_BUNDLED_LIBRARIES)
install(FILES "${PLUGIN_BUNDLED_LIBRARIES}"
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)
endif()

Copy the native assets provided by the build.dart from all packages.

set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/windows/")
install(DIRECTORY "${NATIVE_ASSETS_DIR}"
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)

Fully re-copy the assets directory on each build to avoid having stale files

from a previous install.

set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
install(CODE "
file(REMOVE_RECURSE "${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}")
" COMPONENT Runtime)
install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)

Install the AOT library on non-Debug builds only.

install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
CONFIGURATIONS Profile;Release
COMPONENT Runtime)


File: examples/aws-flutter-web/windows/flutter/CMakeLists.txt

This file controls Flutter-level build steps. It should not be edited.

cmake_minimum_required(VERSION 3.14)

set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")

Configuration provided via flutter tool.

include(${EPHEMERAL_DIR}/generated_config.cmake)

TODO: Move the rest of this into files in ephemeral. See

https://github.com/flutter/flutter/issues/57146.

set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")

Set fallback configurations for older versions of the flutter tool.

if (NOT DEFINED FLUTTER_TARGET_PLATFORM)
set(FLUTTER_TARGET_PLATFORM "windows-x64")
endif()

=== Flutter Library ===

set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")

Published to parent scope for install step.

set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE)

list(APPEND FLUTTER_LIBRARY_HEADERS
"flutter_export.h"
"flutter_windows.h"
"flutter_messenger.h"
"flutter_plugin_registrar.h"
"flutter_texture_registrar.h"
)
list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/")
add_library(flutter INTERFACE)
target_include_directories(flutter INTERFACE
"${EPHEMERAL_DIR}"
)
target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib")
add_dependencies(flutter flutter_assemble)

=== Wrapper ===

list(APPEND CPP_WRAPPER_SOURCES_CORE
"core_implementations.cc"
"standard_codec.cc"
)
list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/")
list(APPEND CPP_WRAPPER_SOURCES_PLUGIN
"plugin_registrar.cc"
)
list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/")
list(APPEND CPP_WRAPPER_SOURCES_APP
"flutter_engine.cc"
"flutter_view_controller.cc"
)
list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/")

Wrapper sources needed for a plugin.

add_library(flutter_wrapper_plugin STATIC
${CPP_WRAPPER_SOURCES_CORE}
${CPP_WRAPPER_SOURCES_PLUGIN}
)
apply_standard_settings(flutter_wrapper_plugin)
set_target_properties(flutter_wrapper_plugin PROPERTIES
POSITION_INDEPENDENT_CODE ON)
set_target_properties(flutter_wrapper_plugin PROPERTIES
CXX_VISIBILITY_PRESET hidden)
target_link_libraries(flutter_wrapper_plugin PUBLIC flutter)
target_include_directories(flutter_wrapper_plugin PUBLIC
"${WRAPPER_ROOT}/include"
)
add_dependencies(flutter_wrapper_plugin flutter_assemble)

Wrapper sources needed for the runner.

add_library(flutter_wrapper_app STATIC
${CPP_WRAPPER_SOURCES_CORE}
${CPP_WRAPPER_SOURCES_APP}
)
apply_standard_settings(flutter_wrapper_app)
target_link_libraries(flutter_wrapper_app PUBLIC flutter)
target_include_directories(flutter_wrapper_app PUBLIC
"${WRAPPER_ROOT}/include"
)
add_dependencies(flutter_wrapper_app flutter_assemble)

=== Flutter tool backend ===

_phony_ is a non-existent file to force this command to run every time,

since currently there's no way to get a full input/output list from the

flutter tool.

set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/phony")
set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE)
add_custom_command(
OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN}
${CPP_WRAPPER_SOURCES_APP}
${PHONY_OUTPUT}
COMMAND ${CMAKE_COMMAND} -E env
${FLUTTER_TOOL_ENVIRONMENT}
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
${FLUTTER_TARGET_PLATFORM} $
VERBATIM
)
add_custom_target(flutter_assemble DEPENDS
"${FLUTTER_LIBRARY}"
${FLUTTER_LIBRARY_HEADERS}
${CPP_WRAPPER_SOURCES_CORE}
${CPP_WRAPPER_SOURCES_PLUGIN}
${CPP_WRAPPER_SOURCES_APP}
)


File: examples/aws-flutter-web/windows/runner/CMakeLists.txt

cmake_minimum_required(VERSION 3.14)
project(runner LANGUAGES CXX)

Define the application target. To change its name, change BINARY_NAME in the

top-level CMakeLists.txt, not the value here, or `flutter run` will no longer

work.

Any new source files that you add to the application should be added here.

add_executable(${BINARY_NAME} WIN32
"flutter_window.cpp"
"main.cpp"
"utils.cpp"
"win32_window.cpp"
"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
"Runner.rc"
"runner.exe.manifest"
)

Apply the standard set of build settings. This can be removed for applications

that need different build settings.

apply_standard_settings(${BINARY_NAME})

Add preprocessor definitions for the build version.

target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION="${FLUTTER_VERSION}"")
target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}")
target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}")
target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}")
target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}")

Disable Windows macros that collide with C++ standard library functions.

target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")

Add dependency libraries and include directories. Add any application-specific

dependencies here.

target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib")
target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")

Run the Flutter tool portions of the build. This must not be removed.

add_dependencies(${BINARY_NAME} flutter_assemble)


File: examples/aws-go-api-gateway-v2/package.json

{
"name": "aws-go-api-gateway-v2",
"module": "index.ts",
"type": "module",
"devDependencies": {
"@types/aws-lambda": "8.10.146",
"@types/bun": "latest"
},
"peerDependencies": {
"typescript": "^5.0.0"
},
"dependencies": {
"sst": "file:../../sdk/js"
},
"scripts": {
"dev": "bun sst dev"
}
}


File: examples/aws-go-api-gateway-v2/tsconfig.json

{
"compilerOptions": {
// Enable latest features
"lib": ["ESNext"],
"target": "ESNext",
"module": "ESNext",
"moduleDetection": "force",
"allowJs": true,

text
// Bundler mode
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"noEmit": true,

// Best practices
"strict": true,
"skipLibCheck": true,
"noFallthroughCasesInSwitch": true,

// Some stricter flags (disabled by default)
"noUnusedLocals": false,
"noUnusedParameters": false,
"noPropertyAccessFromIndexSignature": false

}
}


File: examples/aws-go-lambda-bucket-presigned-url/package.json

{
"name": "aws-go-lambda-bucket-presigned-url",
"module": "index.ts",
"type": "module",
"devDependencies": {
"@types/aws-lambda": "8.10.146",
"@types/bun": "latest"
},
"peerDependencies": {
"typescript": "^5.0.0"
},
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-go-lambda-bucket-presigned-url/tsconfig.json

{
"compilerOptions": {
// Enable latest features
"lib": ["ESNext"],
"target": "ESNext",
"module": "ESNext",
"moduleDetection": "force",
"jsx": "react-jsx",
"allowJs": true,

text
// Bundler mode
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"noEmit": true,

// Best practices
"strict": true,
"skipLibCheck": true,
"noFallthroughCasesInSwitch": true,

// Some stricter flags
"noUnusedLocals": true,
"noUnusedParameters": true,
"noPropertyAccessFromIndexSignature": true

}
}


File: examples/aws-go-lambda-dynamo/package.json

{
"name": "aws-go-lambda-dynamo",
"module": "index.ts",
"type": "module",
"devDependencies": {
"@types/aws-lambda": "8.10.146",
"@types/bun": "latest"
},
"peerDependencies": {
"typescript": "^5.0.0"
},
"dependencies": {
"sst": "file:../../sdk/js"
},
"scripts": {
"dev": "bun sst dev"
}
}


File: examples/aws-go-lambda-dynamo/tsconfig.json

{
"compilerOptions": {
//Enable latest features
"lib": ["ESNext"],
"target": "ESNext",
"module": "ESNext",
"moduleDetection": "force",
"jsx": "react-jsx",
"allowJs": true,

text
// Bundler mode
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"noEmit": true,

// Best practices
"strict": true,
"skipLibCheck": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,

// Some stricter flags (disabled by default)
"noUnusedLocals": false,
"noUnusedParameters": false,
"noPropertyAccessFromIndexSignature": false

}
}


File: examples/aws-hono/package.json

{
"name": "aws-hono",
"type": "module",
"scripts": {
"build": "esbuild --bundle --outfile=./dist/index.js --platform=node --target=node20 ./src/index.ts",
"deploy": "run-s build zip update",
"update": "aws lambda update-function-code --zip-file fileb://lambda.zip --function-name hello",
"zip": "zip -j lambda.zip dist/index.js"
},
"devDependencies": {
"@types/aws-lambda": "8.10.146",
"esbuild": "^0.21.4",
"npm-run-all2": "^6.2.0"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.701.0",
"@aws-sdk/s3-request-presigner": "^3.701.0",
"hono": "^4.6.12",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-hono/tsconfig.json

{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Bundler",
"strict": true,
"skipLibCheck": true,
"types": [
"node"
],
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx",
}
}


File: examples/aws-hono-container/package.json

{
"name": "aws-hono-container",
"type": "module",
"scripts": {
"dev": "tsx watch src/index.ts",
"build": "tsc"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.701.0",
"@aws-sdk/lib-storage": "^3.701.0",
"@aws-sdk/s3-request-presigner": "^3.701.0",
"@hono/node-server": "^1.13.7",
"hono": "^4.6.12",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "8.10.146",
"@types/node": "^20.11.17",
"tsx": "^4.7.1",
"typescript": "^5.7.2"
}
}


File: examples/aws-hono-container/tsconfig.json

{
"compilerOptions": {
"target": "ESNext",
"module": "NodeNext",
"strict": true,
"verbatimModuleSyntax": true,
"skipLibCheck": true,
"types": [
"node"
],
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx",
"outDir": "./dist"
},
"exclude": ["node_modules"]
}


File: examples/aws-hono-redis/package.json

{
"name": "aws-hono-redis",
"type": "module",
"scripts": {
"build": "tsc",
"dev": "tsx watch src/index.ts"
},
"dependencies": {
"@hono/node-server": "^1.13.2",
"hono": "^4.6.5",
"ioredis": "^5.4.1",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "8.10.145",
"@types/node": "^20.11.17",
"tsx": "^4.7.1",
"typescript": "^5.6.3"
}
}


File: examples/aws-hono-redis/tsconfig.json

{
"compilerOptions": {
"target": "ESNext",
"module": "NodeNext",
"strict": true,
"outDir": "./dist",
"verbatimModuleSyntax": true,
"skipLibCheck": true,
"types": [
"node"
],
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx",
},
"exclude": ["node_modules"]
}


File: examples/aws-hono-stream/package.json

{
"name": "aws-hono-stream",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"hono": "^4.6.2",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-hono-stream/tsconfig.json

{}


File: examples/aws-iam-permission-boundary/package.json

{
"name": "aws-iam-permission-boundary",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@aws-sdk/client-s3": "^3.564.0",
"@aws-sdk/client-sqs": "^3.564.0"
}
}


File: examples/aws-import/package.json

{
"name": "aws-import",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-import/tsconfig.json

{}


File: examples/aws-info/package.json

{
"name": "aws-info",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-jsx-email/package.json

{
"name": "aws-jsx-email",
"version": "0.0.0",
"private": true,
"description": "A simple starter for jsx-email",
"scripts": {
"build": "email build ./templates",
"create": "email create",
"dev": "email preview ./templates"
},
"dependencies": {
"@aws-sdk/client-sesv2": "^3.651.1",
"jsx-email": "^1.10.11",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "8.10.145",
"@types/react": "^18.2.0",
"react": "^18.2.0",
"typescript": "^5.2.2"
}
}


File: examples/aws-jsx-email/tsconfig.json

{
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"declaration": true,
"declarationMap": true,
"esModuleInterop": true,
"jsx": "react-jsx",
"lib": ["ES2023"],
"module": "ESNext",
"moduleResolution": "node",
"noEmitOnError": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"preserveSymlinks": true,
"preserveWatchOutput": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"strictNullChecks": true,
"target": "ESNext"
},
"exclude": ["/dist", "/node_modules", "sst.config.ts"],
"include": ["templates", "index.ts", "sst-env.d.ts"]
}


File: examples/aws-kinesis-stream/package.json

{
"name": "aws-kinesis-stream",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "index.js",
"scripts": {
"deploy": "go run ../../cmd/sst deploy",
"remove": "go run ../../cmd/sst remove",
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"sst": "file:../../sdk/js"
},
"dependencies": {
"@aws-sdk/client-kinesis": "^3.598.0"
}
}


File: examples/aws-lambda-ai-stream/package.json

{
"name": "aws-lambda-ai-stream",
"type": "module",
"dependencies": {
"ai": "^6.0.116",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "8.10.145"
}
}


File: examples/aws-lambda-cron/package.json

{
"name": "aws-cron-lambda",
"private": true,
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-lambda-cron/tsconfig.json

{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"esModuleInterop": true
}
}


File: examples/aws-lambda-hook/package.json

{
"name": "aws-lambda-hook",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"type": "commonjs",
"dependencies": {
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "8.10.149"
}
}


File: examples/aws-lambda-hook/tsconfig.json

{}


File: examples/aws-lambda-retry-with-queues/package.json

{
"name": "aws-lambda-retry-with-queues",
"version": "1.0.0",
"description": "",
"type": "module",
"devDependencies": {
"@types/aws-lambda": "8.10.146"
},
"dependencies": {
"sst": "file:../../sdk/js",
"@aws-sdk/client-lambda": "^3.714.0",
"@aws-sdk/client-sqs": "^3.714.0",
"zod": "^3.24.1"
}
}


File: examples/aws-lambda-retry-with-queues/tsconfig.json

{}


File: examples/aws-lambda-stream/package.json

{
"name": "aws-lambda-stream",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "^8.10.161"
}
}


File: examples/aws-lambda-stream/tsconfig.json

{}


File: examples/aws-lambda-trpc-stream/package.json

{
"name": "aws-lambda-trpc-stream",
"type": "module",
"dependencies": {
"@trpc/client": "^11.11.0",
"@trpc/server": "^11.11.0",
"sst": "file:../../sdk/js",
"zod": "^4.3.6"
},
"devDependencies": {
"@types/aws-lambda": "8.10.145"
}
}


File: examples/aws-lambda-vpc/package.json

{
"name": "aws-lambda-vpc",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"ioredis": "^5.4.1",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "8.10.145"
}
}


File: examples/aws-lambda-vpc/tsconfig.json

{}


File: examples/aws-linkable/package.json

{
"name": "aws-linkable",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-linkable/tsconfig.json

{}


File: examples/aws-linkable-env/package.json

{
"name": "aws-linkable-env",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-linkable-env/tsconfig.json

{}


File: examples/aws-load-balancer-waf/package.json

{
"name": "aws-load-balancer-waf",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-monorepo/package.json

{
"name": "aws-monorepo",
"version": "0.0.0",
"workspaces": [
"packages/*"
],
"scripts": {
"dev": "sst dev"
},
"devDependencies": {
"@tsconfig/node20": "^20.1.4",
"typescript": "5.3.3"
},
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-monorepo/tsconfig.json

{}


File: examples/aws-monorepo/packages/astro/package.json

{
"name": "aws-astro",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/check": "^0.5.10",
"@aws-sdk/client-s3": "^3.540.0",
"@aws-sdk/s3-request-presigner": "^3.540.0",
"astro": "^4.5.9",
"astro-sst": "^2.41.2",
"sst": "file:../../../../sdk/js",
"typescript": "^5.4.3"
}
}


File: examples/aws-monorepo/packages/astro/tsconfig.json

{
"extends": "astro/tsconfigs/strict"
}


File: examples/aws-monorepo/packages/core/package.json

{
"name": "@aws-monorepo/core",
"version": "0.0.0",
"exports": {
"./": [
"./src/
/index.ts",
"./src/*.ts"
]
},
"devDependencies": {
"sst": "file:../../../../sdk/js"
}
}


File: examples/aws-monorepo/packages/core/tsconfig.json

{
"extends": "@tsconfig/node20/tsconfig.json",
"compilerOptions": {
"module": "NodeNext",
"moduleResolution": "Bundler",
},
}


File: examples/aws-monorepo/packages/frontend/package.json

{
"name": "@aws-monorepo/frontend",
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build"
},
"devDependencies": {
"vite": "^5.2.8",
"sst": "file:../../../../sdk/js"
}
}


File: examples/aws-monorepo/packages/functions/package.json

{
"name": "@aws-monorepo/functions",
"version": "0.0.0",
"dependencies": {
"@aws-monorepo/core": "*",
"sst": "file:../../../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "^8.10.137",
"sst": "file:../../../../sdk/js"
}
}


File: examples/aws-monorepo/packages/functions/tsconfig.json

{
"extends": "@tsconfig/node20/tsconfig.json",
"compilerOptions": {
"module": "NodeNext",
"moduleResolution": "Bundler",
},
}


File: examples/aws-monorepo/packages/scripts/package.json

{
"name": "@aws-monorepo/scripts",
"version": "0.0.0",
"dependencies": {
"@aws-monorepo/core": "*",
"sst": "file:../../../../sdk/js"
},
"scripts": {
"shell": "sst shell tsx"
},
"devDependencies": {
"tsx": "^4.7.2"
}
}


File: examples/aws-monorepo/packages/scripts/tsconfig.json

{
"extends": "@tsconfig/node20/tsconfig.json",
"compilerOptions": {
"module": "NodeNext",
"moduleResolution": "Bundler",
},
}


File: examples/aws-multi-region/package.json

{
"name": "aws-multi-region",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "^8.10.145",
"@types/node": "^22.5.4"
}
}


File: examples/aws-mysql/package.json

{
"name": "aws-mysql",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"mysql2": "3.14.0",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-mysql-local/package.json

{
"name": "aws-mysql-local",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"mysql2": "3.14.0",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "8.10.145"
}
}


File: examples/aws-mysql-local/tsconfig.json

{}


File: examples/aws-nestjs-container/nest-cli.json

{
"$schema": "https://json.schemastore.org/nest-cli",
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"compilerOptions": {
"deleteOutDir": true
}
}


File: examples/aws-nestjs-container/package.json

{
"name": "aws-nestjs-container",
"version": "0.0.1",
"description": "",
"author": "",
"private": true,
"license": "UNLICENSED",
"scripts": {
"build": "nest build",
"format": "prettier --write "src//*.ts" "test//.ts"",
"lint": "eslint "{src,apps,libs,test}/**/
.ts" --fix",
"start": "nest start",
"start:debug": "nest start --debug --watch",
"start:dev": "nest start --watch",
"start:prod": "node dist/main",
"test": "jest",
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config ./test/jest-e2e.json",
"test:watch": "jest --watch"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.717.0",
"@aws-sdk/lib-storage": "^3.717.0",
"@aws-sdk/s3-request-presigner": "^3.717.0",
"@nestjs/common": "^10.0.0",
"@nestjs/core": "^10.0.0",
"@nestjs/platform-express": "^10.0.0",
"reflect-metadata": "^0.2.0",
"rxjs": "^7.8.1",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@nestjs/cli": "^10.0.0",
"@nestjs/schematics": "^10.0.0",
"@nestjs/testing": "^10.0.0",
"@types/aws-lambda": "8.10.146",
"@types/express": "^5.0.0",
"@types/jest": "^29.5.2",
"@types/multer": "^1.4.12",
"@types/node": "^20.3.1",
"@types/supertest": "^6.0.0",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"eslint": "^8.0.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"jest": "^29.5.0",
"prettier": "^3.0.0",
"source-map-support": "^0.5.21",
"supertest": "^7.0.0",
"ts-jest": "^29.1.0",
"ts-loader": "^9.4.3",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.1.3"
},
"jest": {
"collectCoverageFrom": [
"**/.(t|j)s"
],
"coverageDirectory": "../coverage",
"moduleFileExtensions": [
"js",
"json",
"ts"
],
"rootDir": "src",
"testEnvironment": "node",
"testRegex": ".
\.spec\.ts$",
"transform": {
"^.+\.(t|j)s$": "ts-jest"
}
}
}


File: examples/aws-nestjs-container/tsconfig.build.json

{
"extends": "./tsconfig.json",
"exclude": ["node_modules", "test", "dist", "**/*spec.ts"]
}


File: examples/aws-nestjs-container/tsconfig.json

{
"compilerOptions": {
"module": "commonjs",
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"target": "ES2021",
"sourceMap": true,
"outDir": "./dist",
"baseUrl": "./",
"incremental": true,
"skipLibCheck": true,
"strictNullChecks": false,
"noImplicitAny": false,
"strictBindCallApply": false,
"forceConsistentCasingInFileNames": false,
"noFallthroughCasesInSwitch": false
},
"include": ["src//*", "test//*", "sst-env.d.ts"]
}


File: examples/aws-nestjs-container/test/jest-e2e.json

{
"moduleFileExtensions": ["js", "json", "ts"],
"rootDir": ".",
"testEnvironment": "node",
"testRegex": ".e2e-spec.ts$",
"transform": {
"^.+\.(t|j)s$": "ts-jest"
}
}


File: examples/aws-nestjs-redis/nest-cli.json

{
"$schema": "https://json.schemastore.org/nest-cli",
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"compilerOptions": {
"deleteOutDir": true
}
}


File: examples/aws-nestjs-redis/package.json

{
"name": "aws-nestjs-redis",
"version": "0.0.1",
"description": "",
"author": "",
"private": true,
"license": "UNLICENSED",
"scripts": {
"build": "nest build",
"format": "prettier --write "src//*.ts" "test//.ts"",
"lint": "eslint "{src,apps,libs,test}/**/
.ts" --fix",
"start": "nest start",
"start:debug": "nest start --debug --watch",
"start:dev": "nest start --watch",
"start:prod": "node dist/main",
"test": "jest",
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config ./test/jest-e2e.json",
"test:watch": "jest --watch"
},
"dependencies": {
"@nestjs/common": "^10.0.0",
"@nestjs/core": "^10.0.0",
"@nestjs/platform-express": "^10.0.0",
"ioredis": "^5.4.1",
"reflect-metadata": "^0.2.0",
"rxjs": "^7.8.1",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@nestjs/cli": "^10.0.0",
"@nestjs/schematics": "^10.0.0",
"@nestjs/testing": "^10.0.0",
"@types/aws-lambda": "8.10.145",
"@types/express": "^4.17.17",
"@types/jest": "^29.5.2",
"@types/node": "^20.3.1",
"@types/supertest": "^6.0.0",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"eslint": "^8.42.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"jest": "^29.5.0",
"prettier": "^3.0.0",
"source-map-support": "^0.5.21",
"supertest": "^7.0.0",
"ts-jest": "^29.1.0",
"ts-loader": "^9.4.3",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.1.3"
},
"jest": {
"collectCoverageFrom": [
"**/.(t|j)s"
],
"coverageDirectory": "../coverage",
"moduleFileExtensions": [
"js",
"json",
"ts"
],
"rootDir": "src",
"testEnvironment": "node",
"testRegex": ".
\.spec\.ts$",
"transform": {
"^.+\.(t|j)s$": "ts-jest"
}
}
}


File: examples/aws-nestjs-redis/tsconfig.build.json

{
"extends": "./tsconfig.json",
"exclude": ["node_modules", "test", "dist", "**/*spec.ts"]
}


File: examples/aws-nestjs-redis/tsconfig.json

{
"compilerOptions": {
"module": "commonjs",
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"target": "ES2021",
"sourceMap": true,
"outDir": "./dist",
"baseUrl": "./",
"incremental": true,
"skipLibCheck": true,
"strictNullChecks": false,
"noImplicitAny": false,
"strictBindCallApply": false,
"forceConsistentCasingInFileNames": false,
"noFallthroughCasesInSwitch": false
},
"include": ["src//*", "test//*", "sst-env.d.ts"],
}


File: examples/aws-nestjs-redis/test/jest-e2e.json

{
"moduleFileExtensions": ["js", "json", "ts"],
"rootDir": ".",
"testEnvironment": "node",
"testRegex": ".e2e-spec.ts$",
"transform": {
"^.+\.(t|j)s$": "ts-jest"
}
}


File: examples/aws-nextjs/package.json

{
"name": "aws-nextjs",
"version": "0.1.0",
"private": true,
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.668.0",
"@aws-sdk/s3-request-presigner": "^3.668.0",
"next": "14.2.15",
"react": "^18",
"react-dom": "^18",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"typescript": "^5"
}
}


File: examples/aws-nextjs/tsconfig.json

{
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/": ["./"]
}
},
"include": ["next-env.d.ts", "/*.ts", "/.tsx", ".next/types/**/.ts"],
"exclude": ["node_modules","sst.config.ts"]
}


File: examples/aws-nextjs-add-behavior/package.json

{
"name": "aws-nextjs-add-behavior",
"version": "0.1.0",
"private": true,
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
},
"dependencies": {
"next": "15.0.1",
"react": "19.0.0-rc-69d4b800-20241021",
"react-dom": "19.0.0-rc-69d4b800-20241021",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"typescript": "^5"
}
}


File: examples/aws-nextjs-add-behavior/tsconfig.json

{
"compilerOptions": {
"target": "ES2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/": ["./"]
}
},
"include": ["next-env.d.ts", "/*.ts", "/.tsx", ".next/types/**/.ts"],
"exclude": ["node_modules","sst.config.ts"]
}


File: examples/aws-nextjs-basic-auth/package.json

{
"name": "aws-nextjs-basic-auth",
"version": "0.1.0",
"private": true,
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
},
"dependencies": {
"next": "14.2.9",
"react": "^18",
"react-dom": "^18",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "14.2.9",
"typescript": "^5"
}
}


File: examples/aws-nextjs-basic-auth/tsconfig.json

{
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/": ["./"]
}
},
"include": ["next-env.d.ts", "/*.ts", "/.tsx", ".next/types/**/.ts"],
"exclude": ["node_modules","sst.config.ts"]
}


File: examples/aws-nextjs-basic-auth/.eslintrc.json

{
"extends": ["next/core-web-vitals", "next/typescript"]
}


File: examples/aws-nextjs-container/package.json

{
"name": "aws-nextjs-container",
"version": "0.1.0",
"private": true,
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.701.0",
"@aws-sdk/s3-request-presigner": "^3.701.0",
"next": "15.0.3",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"typescript": "^5"
}
}


File: examples/aws-nextjs-container/tsconfig.json

{
"compilerOptions": {
"target": "ES2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/": ["./"]
}
},
"include": ["next-env.d.ts", "/*.ts", "/.tsx", ".next/types/**/.ts"],
"exclude": ["node_modules","sst.config.ts"]
}


File: examples/aws-nextjs-redis/package.json

{
"name": "aws-nextjs-redis",
"version": "0.1.0",
"private": true,
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
},
"dependencies": {
"ioredis": "^5.4.1",
"next": "14.2.14",
"react": "^18",
"react-dom": "^18",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"typescript": "^5"
}
}


File: examples/aws-nextjs-redis/tsconfig.json

{
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/": ["./"]
}
},
"include": ["next-env.d.ts", "/*.ts", "/.tsx", ".next/types/**/.ts"],
"exclude": ["node_modules","sst.config.ts"]
}


File: examples/aws-nextjs-stream/package.json

{
"name": "aws-nextjs-stream",
"version": "0.1.0",
"private": true,
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
},
"dependencies": {
"next": "14.2.12",
"react": "^18",
"react-dom": "^18",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"typescript": "^5"
}
}


File: examples/aws-nextjs-stream/tsconfig.json

{
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/": ["./"]
}
},
"include": ["next-env.d.ts", "/*.ts", "/.tsx", ".next/types/**/.ts"],
"exclude": ["node_modules","sst.config.ts"]
}


File: examples/aws-nuxt/package.json

{
"name": "aws-nuxt",
"private": true,
"type": "module",
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"postinstall": "nuxt prepare",
"preview": "nuxt preview"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.651.1",
"@aws-sdk/s3-request-presigner": "^3.651.1",
"nuxt": "^3.13.0",
"sst": "file:../../sdk/js",
"vue": "latest",
"vue-router": "latest"
}
}


File: examples/aws-nuxt/tsconfig.json

{
// https://nuxt.com/docs/guide/concepts/typescript
"extends": "./.nuxt/tsconfig.json"
}


File: examples/aws-nuxt/server/tsconfig.json

{
"extends": "../.nuxt/tsconfig.server.json"
}


File: examples/aws-nuxt-container/package.json

{
"name": "aws-nuxt-container",
"private": true,
"type": "module",
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"postinstall": "nuxt prepare",
"preview": "nuxt preview"
},
"dependencies": {
"ioredis": "^5.4.1",
"nuxt": "^3.13.0",
"sst": "file:../../sdk/js",
"vue": "latest",
"vue-router": "latest"
},
"overrides": {
"nitropack": "npm:nitropack-nightly@latest"
}
}


File: examples/aws-nuxt-container/tsconfig.json

{
// https://nuxt.com/docs/guide/concepts/typescript
"extends": "./.nuxt/tsconfig.json"
}


File: examples/aws-nuxt-container/server/tsconfig.json

{
"extends": "../.nuxt/tsconfig.server.json"
}


File: examples/aws-nuxt-stream/package.json

{
"name": "nuxt-app",
"private": true,
"type": "module",
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"postinstall": "nuxt prepare",
"preview": "nuxt preview"
},
"dependencies": {
"nuxt": "^3.15.5",
"sst": "file:../../sdk/js",
"vue": "latest",
"vue-router": "latest"
}
}


File: examples/aws-nuxt-stream/tsconfig.json

{
// https://nuxt.com/docs/guide/concepts/typescript
"extends": "./.nuxt/tsconfig.json"
}


File: examples/aws-nuxt-stream/server/tsconfig.json

{
"extends": "../.nuxt/tsconfig.server.json"
}


File: examples/aws-open-search/package.json

{
"name": "aws-open-search",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"@opensearch-project/opensearch": "^3.5.1",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-open-search-local/package.json

{
"name": "aws-open-search-local",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@opensearch-project/opensearch": "^3.5.1",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "8.10.145"
}
}


File: examples/aws-open-search-local/tsconfig.json

{}


File: examples/aws-planetscale-drizzle-mysql/package.json

{
"name": "aws-planetscale-drizzle-mysql",
"version": "0.0.0",
"scripts": {
"db": "sst shell drizzle-kit",
"db:push": "sst shell drizzle-kit push",
"db:studio": "sst shell drizzle-kit studio"
},
"dependencies": {
"@planetscale/database": "^1.19.0",
"drizzle-kit": "^0.31.10",
"drizzle-orm": "^0.45.1",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-planetscale-drizzle-mysql/tsconfig.json

{}


File: examples/aws-planetscale-drizzle-postgres/package.json

{
"name": "aws-planetscale-drizzle-postgres",
"version": "0.0.0",
"scripts": {
"db": "sst shell drizzle-kit",
"db:push": "sst shell drizzle-kit push",
"db:studio": "sst shell drizzle-kit studio"
},
"dependencies": {
"@neondatabase/serverless": "^1.0.2",
"drizzle-kit": "^0.31.10",
"drizzle-orm": "^0.45.1",
"postgres": "^3.4.5",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-planetscale-drizzle-postgres/tsconfig.json

{}


File: examples/aws-policy-pack/package.json

{
"name": "aws-policy-pack",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-policy-pack/tsconfig.json

{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "node",
"esModuleInterop": true,
"strict": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"outDir": ".build"
},
"include": ["**/*.ts"]
}


File: examples/aws-policy-pack/policy-pack/package.json

{
"name": "policy-pack",
"version": "0.0.1",
"dependencies": {
"@pulumi/aws": "^6.0.0",
"@pulumi/policy": "^1.20.0"
},
"devDependencies": {
"@types/node": "^10.0.0"
}
}


File: examples/aws-policy-pack/policy-pack/PulumiPolicy.yaml

runtime: nodejs
main: dist/index.js


File: examples/aws-policy-pack/policy-pack/tsconfig.json

{
"compilerOptions": {
"target": "ES2018",
"module": "CommonJS",
"moduleResolution": "node",
"declaration": true,
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"outDir": "dist"
},
"include": ["index.ts"]
}


File: examples/aws-postgres/package.json

{
"name": "aws-postgres",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"pg": "^8.13.0",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-postgres-local/package.json

{
"name": "aws-postgres-local",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"pg": "^8.13.1",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "8.10.145",
"@types/pg": "^8.11.10"
}
}


File: examples/aws-postgres-local/tsconfig.json

{}


File: examples/aws-pothos-graphql/package.json

{
"name": "aws-pothos-graphql",
"dependencies": {
"@pothos/core": "^3.41.1",
"@urql/core": "^5.0.4",
"graphql-yoga": "^5.3.1",
"react": "^18.3.1",
"sst": "file:../../sdk/js",
"urql": "^4.1.0",
"wonka": "^6.3.4"
},
"devDependencies": {
"@genql/cli": "^6.3.3",
"@types/aws-lambda": "8.10.138",
"@types/react": "^18.3.3"
}
}


File: examples/aws-pothos-graphql/tsconfig.json

{
"compilerOptions": {
"strict": true
}
}


File: examples/aws-prisma/package.json

{
"name": "aws-prisma",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@types/aws-lambda": "8.10.145",
"@types/node": "^22.7.8",
"prisma": "^5.21.1",
"ts-node": "^10.9.2",
"typescript": "^5.6.3"
},
"dependencies": {
"@prisma/client": "^5.21.1",
"express": "^4.21.1",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-prisma/tsconfig.json

{
"compilerOptions": {
/* Visit https://aka.ms/tsconfig to read more about this file */

text
/* Projects */
// "incremental": true,                              /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
// "composite": true,                                /* Enable constraints that allow a TypeScript project to be used with project references. */
// "tsBuildInfoFile": "./.tsbuildinfo",              /* Specify the path to .tsbuildinfo incremental compilation file. */
// "disableSourceOfProjectReferenceRedirect": true,  /* Disable preferring source files instead of declaration files when referencing composite projects. */
// "disableSolutionSearching": true,                 /* Opt a project out of multi-project reference checking when editing. */
// "disableReferencedProjectLoad": true,             /* Reduce the number of projects loaded automatically by TypeScript. */

/* Language and Environment */
"target": "es2016",                                  /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
// "lib": [],                                        /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "jsx": "preserve",                                /* Specify what JSX code is generated. */
// "experimentalDecorators": true,                   /* Enable experimental support for legacy experimental decorators. */
// "emitDecoratorMetadata": true,                    /* Emit design-type metadata for decorated declarations in source files. */
// "jsxFactory": "",                                 /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
// "jsxFragmentFactory": "",                         /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
// "jsxImportSource": "",                            /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
// "reactNamespace": "",                             /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
// "noLib": true,                                    /* Disable including any library files, including the default lib.d.ts. */
// "useDefineForClassFields": true,                  /* Emit ECMAScript-standard-compliant class fields. */
// "moduleDetection": "auto",                        /* Control what method is used to detect module-format JS files. */

/* Modules */
"module": "commonjs",                                /* Specify what module code is generated. */
// "rootDir": "./",                                  /* Specify the root folder within your source files. */
// "moduleResolution": "node10",                     /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./",                                  /* Specify the base directory to resolve non-relative module names. */
// "paths": {},                                      /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [],                                   /* Allow multiple folders to be treated as one when resolving modules. */
// "typeRoots": [],                                  /* Specify multiple folders that act like './node_modules/@types'. */
// "types": [],                                      /* Specify type package names to be included without being referenced in a source file. */
// "allowUmdGlobalAccess": true,                     /* Allow accessing UMD globals from modules. */
// "moduleSuffixes": [],                             /* List of file name suffixes to search when resolving a module. */
// "allowImportingTsExtensions": true,               /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
// "resolvePackageJsonExports": true,                /* Use the package.json 'exports' field when resolving package imports. */
// "resolvePackageJsonImports": true,                /* Use the package.json 'imports' field when resolving imports. */
// "customConditions": [],                           /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
// "noUncheckedSideEffectImports": true,             /* Check side effect imports. */
// "resolveJsonModule": true,                        /* Enable importing .json files. */
// "allowArbitraryExtensions": true,                 /* Enable importing files with any extension, provided a declaration file is present. */
// "noResolve": true,                                /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */

/* JavaScript Support */
// "allowJs": true,                                  /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
// "checkJs": true,                                  /* Enable error reporting in type-checked JavaScript files. */
// "maxNodeModuleJsDepth": 1,                        /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */

/* Emit */
// "declaration": true,                              /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
// "declarationMap": true,                           /* Create sourcemaps for d.ts files. */
// "emitDeclarationOnly": true,                      /* Only output d.ts files and not JavaScript files. */
// "sourceMap": true,                                /* Create source map files for emitted JavaScript files. */
// "inlineSourceMap": true,                          /* Include sourcemap files inside the emitted JavaScript. */
// "noEmit": true,                                   /* Disable emitting files from a compilation. */
// "outFile": "./",                                  /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
// "outDir": "./",                                   /* Specify an output folder for all emitted files. */
// "removeComments": true,                           /* Disable emitting comments. */
// "importHelpers": true,                            /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
// "downlevelIteration": true,                       /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
// "sourceRoot": "",                                 /* Specify the root path for debuggers to find the reference source code. */
// "mapRoot": "",                                    /* Specify the location where debugger should locate map files instead of generated locations. */
// "inlineSources": true,                            /* Include source code in the sourcemaps inside the emitted JavaScript. */
// "emitBOM": true,                                  /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
// "newLine": "crlf",                                /* Set the newline character for emitting files. */
// "stripInternal": true,                            /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
// "noEmitHelpers": true,                            /* Disable generating custom helper functions like '__extends' in compiled output. */
// "noEmitOnError": true,                            /* Disable emitting files if any type checking errors are reported. */
// "preserveConstEnums": true,                       /* Disable erasing 'const enum' declarations in generated code. */
// "declarationDir": "./",                           /* Specify the output directory for generated declaration files. */

/* Interop Constraints */
// "isolatedModules": true,                          /* Ensure that each file can be safely transpiled without relying on other imports. */
// "verbatimModuleSyntax": true,                     /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
// "isolatedDeclarations": true,                     /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */
// "allowSyntheticDefaultImports": true,             /* Allow 'import x from y' when a module doesn't have a default export. */
"esModuleInterop": true,                             /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
// "preserveSymlinks": true,                         /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
"forceConsistentCasingInFileNames": true,            /* Ensure that casing is correct in imports. */

/* Type Checking */
"strict": true,                                      /* Enable all strict type-checking options. */
// "noImplicitAny": true,                            /* Enable error reporting for expressions and declarations with an implied 'any' type. */
// "strictNullChecks": true,                         /* When type checking, take into account 'null' and 'undefined'. */
// "strictFunctionTypes": true,                      /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
// "strictBindCallApply": true,                      /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
// "strictPropertyInitialization": true,             /* Check for class properties that are declared but not set in the constructor. */
// "strictBuiltinIteratorReturn": true,              /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */
// "noImplicitThis": true,                           /* Enable error reporting when 'this' is given the type 'any'. */
// "useUnknownInCatchVariables": true,               /* Default catch clause variables as 'unknown' instead of 'any'. */
// "alwaysStrict": true,                             /* Ensure 'use strict' is always emitted. */
// "noUnusedLocals": true,                           /* Enable error reporting when local variables aren't read. */
// "noUnusedParameters": true,                       /* Raise an error when a function parameter isn't read. */
// "exactOptionalPropertyTypes": true,               /* Interpret optional property types as written, rather than adding 'undefined'. */
// "noImplicitReturns": true,                        /* Enable error reporting for codepaths that do not explicitly return in a function. */
// "noFallthroughCasesInSwitch": true,               /* Enable error reporting for fallthrough cases in switch statements. */
// "noUncheckedIndexedAccess": true,                 /* Add 'undefined' to a type when accessed using an index. */
// "noImplicitOverride": true,                       /* Ensure overriding members in derived classes are marked with an override modifier. */
// "noPropertyAccessFromIndexSignature": true,       /* Enforces using indexed accessors for keys declared using an indexed type. */
// "allowUnusedLabels": true,                        /* Disable error reporting for unused labels. */
// "allowUnreachableCode": true,                     /* Disable error reporting for unreachable code. */

/* Completeness */
// "skipDefaultLibCheck": true,                      /* Skip type checking .d.ts files that are included with TypeScript. */
"skipLibCheck": true                                 /* Skip type checking all .d.ts files. */

}
}


File: examples/aws-prisma-lambda/package.json

{
"name": "aws-prisma-lambda",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"postinstall": "prisma generate",
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@types/aws-lambda": "^8.10.145",
"@types/node": "^22.5.4",
"prisma": "^5.19.1",
"ts-node": "^10.9.2",
"typescript": "^5.5.4"
},
"dependencies": {
"@prisma/client": "^5.19.1",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-prisma-lambda/tsconfig.json

{
"compilerOptions": {
/* Visit https://aka.ms/tsconfig to read more about this file */

text
/* Projects */
// "incremental": true,                              /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
// "composite": true,                                /* Enable constraints that allow a TypeScript project to be used with project references. */
// "tsBuildInfoFile": "./.tsbuildinfo",              /* Specify the path to .tsbuildinfo incremental compilation file. */
// "disableSourceOfProjectReferenceRedirect": true,  /* Disable preferring source files instead of declaration files when referencing composite projects. */
// "disableSolutionSearching": true,                 /* Opt a project out of multi-project reference checking when editing. */
// "disableReferencedProjectLoad": true,             /* Reduce the number of projects loaded automatically by TypeScript. */

/* Language and Environment */
"target": "es2016",                                  /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
// "lib": [],                                        /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "jsx": "preserve",                                /* Specify what JSX code is generated. */
// "experimentalDecorators": true,                   /* Enable experimental support for legacy experimental decorators. */
// "emitDecoratorMetadata": true,                    /* Emit design-type metadata for decorated declarations in source files. */
// "jsxFactory": "",                                 /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
// "jsxFragmentFactory": "",                         /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
// "jsxImportSource": "",                            /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
// "reactNamespace": "",                             /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
// "noLib": true,                                    /* Disable including any library files, including the default lib.d.ts. */
// "useDefineForClassFields": true,                  /* Emit ECMAScript-standard-compliant class fields. */
// "moduleDetection": "auto",                        /* Control what method is used to detect module-format JS files. */

/* Modules */
"module": "commonjs",                                /* Specify what module code is generated. */
// "rootDir": "./",                                  /* Specify the root folder within your source files. */
// "moduleResolution": "node10",                     /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./",                                  /* Specify the base directory to resolve non-relative module names. */
// "paths": {},                                      /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [],                                   /* Allow multiple folders to be treated as one when resolving modules. */
// "typeRoots": [],                                  /* Specify multiple folders that act like './node_modules/@types'. */
// "types": [],                                      /* Specify type package names to be included without being referenced in a source file. */
// "allowUmdGlobalAccess": true,                     /* Allow accessing UMD globals from modules. */
// "moduleSuffixes": [],                             /* List of file name suffixes to search when resolving a module. */
// "allowImportingTsExtensions": true,               /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
// "resolvePackageJsonExports": true,                /* Use the package.json 'exports' field when resolving package imports. */
// "resolvePackageJsonImports": true,                /* Use the package.json 'imports' field when resolving imports. */
// "customConditions": [],                           /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
// "resolveJsonModule": true,                        /* Enable importing .json files. */
// "allowArbitraryExtensions": true,                 /* Enable importing files with any extension, provided a declaration file is present. */
// "noResolve": true,                                /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */

/* JavaScript Support */
// "allowJs": true,                                  /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
// "checkJs": true,                                  /* Enable error reporting in type-checked JavaScript files. */
// "maxNodeModuleJsDepth": 1,                        /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */

/* Emit */
// "declaration": true,                              /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
// "declarationMap": true,                           /* Create sourcemaps for d.ts files. */
// "emitDeclarationOnly": true,                      /* Only output d.ts files and not JavaScript files. */
// "sourceMap": true,                                /* Create source map files for emitted JavaScript files. */
// "inlineSourceMap": true,                          /* Include sourcemap files inside the emitted JavaScript. */
// "outFile": "./",                                  /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
// "outDir": "./",                                   /* Specify an output folder for all emitted files. */
// "removeComments": true,                           /* Disable emitting comments. */
// "noEmit": true,                                   /* Disable emitting files from a compilation. */
// "importHelpers": true,                            /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
// "downlevelIteration": true,                       /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
// "sourceRoot": "",                                 /* Specify the root path for debuggers to find the reference source code. */
// "mapRoot": "",                                    /* Specify the location where debugger should locate map files instead of generated locations. */
// "inlineSources": true,                            /* Include source code in the sourcemaps inside the emitted JavaScript. */
// "emitBOM": true,                                  /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
// "newLine": "crlf",                                /* Set the newline character for emitting files. */
// "stripInternal": true,                            /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
// "noEmitHelpers": true,                            /* Disable generating custom helper functions like '__extends' in compiled output. */
// "noEmitOnError": true,                            /* Disable emitting files if any type checking errors are reported. */
// "preserveConstEnums": true,                       /* Disable erasing 'const enum' declarations in generated code. */
// "declarationDir": "./",                           /* Specify the output directory for generated declaration files. */

/* Interop Constraints */
// "isolatedModules": true,                          /* Ensure that each file can be safely transpiled without relying on other imports. */
// "verbatimModuleSyntax": true,                     /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
// "isolatedDeclarations": true,                     /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */
// "allowSyntheticDefaultImports": true,             /* Allow 'import x from y' when a module doesn't have a default export. */
"esModuleInterop": true,                             /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
// "preserveSymlinks": true,                         /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
"forceConsistentCasingInFileNames": true,            /* Ensure that casing is correct in imports. */

/* Type Checking */
"strict": true,                                      /* Enable all strict type-checking options. */
// "noImplicitAny": true,                            /* Enable error reporting for expressions and declarations with an implied 'any' type. */
// "strictNullChecks": true,                         /* When type checking, take into account 'null' and 'undefined'. */
// "strictFunctionTypes": true,                      /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
// "strictBindCallApply": true,                      /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
// "strictPropertyInitialization": true,             /* Check for class properties that are declared but not set in the constructor. */
// "noImplicitThis": true,                           /* Enable error reporting when 'this' is given the type 'any'. */
// "useUnknownInCatchVariables": true,               /* Default catch clause variables as 'unknown' instead of 'any'. */
// "alwaysStrict": true,                             /* Ensure 'use strict' is always emitted. */
// "noUnusedLocals": true,                           /* Enable error reporting when local variables aren't read. */
// "noUnusedParameters": true,                       /* Raise an error when a function parameter isn't read. */
// "exactOptionalPropertyTypes": true,               /* Interpret optional property types as written, rather than adding 'undefined'. */
// "noImplicitReturns": true,                        /* Enable error reporting for codepaths that do not explicitly return in a function. */
// "noFallthroughCasesInSwitch": true,               /* Enable error reporting for fallthrough cases in switch statements. */
// "noUncheckedIndexedAccess": true,                 /* Add 'undefined' to a type when accessed using an index. */
// "noImplicitOverride": true,                       /* Ensure overriding members in derived classes are marked with an override modifier. */
// "noPropertyAccessFromIndexSignature": true,       /* Enforces using indexed accessors for keys declared using an indexed type. */
// "allowUnusedLabels": true,                        /* Disable error reporting for unused labels. */
// "allowUnreachableCode": true,                     /* Disable error reporting for unreachable code. */

/* Completeness */
// "skipDefaultLibCheck": true,                      /* Skip type checking .d.ts files that are included with TypeScript. */
"skipLibCheck": true                                 /* Skip type checking all .d.ts files. */

}
}


File: examples/aws-puppeteer/package.json

{
"name": "aws-puppeteer",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@sparticuz/chromium": "^127.0.0",
"puppeteer-core": "^23.1.1",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "8.10.145"
}
}


File: examples/aws-puppeteer/tsconfig.json

{
"compilerOptions": {
"esModuleInterop": true
}
}


File: examples/aws-python/tsconfig.json

{}


File: examples/aws-python-container/tsconfig.json

{}


File: examples/aws-python-huggingface/tsconfig.json

{}


File: examples/aws-queue/package.json

{
"name": "aws-queue",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "index.js",
"scripts": {
"deploy": "go run ../../cmd/sst deploy",
"remove": "go run ../../cmd/sst remove",
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@types/aws-lambda": "^8.10.149",
"sst": "file:../../sdk/js"
},
"dependencies": {
"@aws-sdk/client-sqs": "^3.515.0"
}
}


File: examples/aws-quota-increase/package.json

{
"name": "aws-quota-increase",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-rails/.rubocop.yml

Omakase Ruby styling for Rails

inherit_gem: { rubocop-rails-omakase: rubocop.yml }

Overwrite or add rules to create your own house style

# Use `[a, [b, c]]` not `[ a, [ b, c ] ]`

Layout/SpaceInsideArrayLiteralBrackets:

Enabled: false


File: examples/aws-rails/config/cable.yml

development:
adapter: async

test:
adapter: test

production:
adapter: redis
url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
channel_prefix: aws_rails_production


File: examples/aws-rails/config/database.yml

SQLite. Versions 3.8.0 and up are supported.

gem install sqlite3

Ensure the SQLite 3 gem is defined in your Gemfile

gem "sqlite3"

default: &default
adapter: sqlite3
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
timeout: 5000

development:
<<: *default
database: storage/development.sqlite3

Warning: The database defined as "test" will be erased and

re-generated from your development database when you run "rake".

Do not set this db to the same as development or production.

test:
<<: *default
database: storage/test.sqlite3

SQLite3 write its data on the local filesystem, as such it requires

persistent disks. If you are deploying to a managed service, you should

make sure it provides disk persistence, as many don't.

Similarly, if you deploy your application as a Docker container, you must

ensure the database is located in a persisted volume.

production:
<<: *default
database: /tmp/production.sqlite3


File: examples/aws-rails/config/storage.yml

test:
service: Disk
root: <%= Rails.root.join("tmp/storage") %>

local:
service: Disk
root: <%= Rails.root.join("storage") %>

Use bin/rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)

amazon:
service: S3

access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>

secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>

region: us-east-1

bucket: <%= JSON.parse(ENV["SST_RESOURCE_MyBucket"])["name"] %>

Remember not to checkin your GCS keyfile to a repository

google:

service: GCS

project: your_project

credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>

bucket: your_own_bucket-<%= Rails.env %>

Use bin/rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)

microsoft:

service: AzureStorage

storage_account_name: your_account_name

storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>

container: your_container_name-<%= Rails.env %>

mirror:

service: Mirror

primary: local

mirrors: [ amazon, google, microsoft ]


File: examples/aws-rails/config/locales/en.yml

Files in the config/locales directory are used for internationalization and

are automatically loaded by Rails. If you want to use locales other than

English, add the necessary files in this directory.

To use the locales, use `I18n.t`:

I18n.t "hello"

In views, this is aliased to just `t`:

<%= t("hello") %>

To use a different locale, set it with `I18n.locale`:

I18n.locale = :es

This would use the information in config/locales/es.yml.

To learn more about the API, please read the Rails Internationalization guide

at https://guides.rubyonrails.org/i18n.html.

Be aware that YAML interprets the following case-insensitive strings as

booleans: `true`, `false`, `on`, `off`, `yes`, `no`. Therefore, these strings

must be quoted to be interpreted as strings. For example:

en:

"yes": yup

enabled: "ON"

en:
hello: "Hello world"


File: examples/aws-rails/public/robots.txt

See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file


File: examples/aws-rails/.github/dependabot.yml

version: 2
updates:

  • package-ecosystem: bundler
    directory: "/"
    schedule:
    interval: daily
    open-pull-requests-limit: 10
  • package-ecosystem: github-actions
    directory: "/"
    schedule:
    interval: daily
    open-pull-requests-limit: 10

File: examples/aws-rails/.github/workflows/ci.yml

name: CI

on:
pull_request:
push:
branches: [ main ]

jobs:
scan_ruby:
runs-on: ubuntu-latest

text
steps:
  - name: Checkout code
    uses: actions/checkout@v4

  - name: Set up Ruby
    uses: ruby/setup-ruby@v1
    with:
      ruby-version: .ruby-version
      bundler-cache: true

  - name: Scan for common Rails security vulnerabilities using static analysis
    run: bin/brakeman --no-pager

scan_js:
runs-on: ubuntu-latest

text
steps:
  - name: Checkout code
    uses: actions/checkout@v4

  - name: Set up Ruby
    uses: ruby/setup-ruby@v1
    with:
      ruby-version: .ruby-version
      bundler-cache: true

  - name: Scan for security vulnerabilities in JavaScript dependencies
    run: bin/importmap audit

lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

text
- name: Set up Ruby
    uses: ruby/setup-ruby@v1
    with:
      ruby-version: .ruby-version
      bundler-cache: true

  - name: Lint code for consistent style
    run: bin/rubocop -f github

test:
runs-on: ubuntu-latest

text
# services:
#  redis:
#    image: redis
#    ports:
#      - 6379:6379
#    options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
steps:
  - name: Install packages
    run: sudo apt-get update && sudo apt-get install --no-install-recommends -y google-chrome-stable curl libjemalloc2 libvips sqlite3

  - name: Checkout code
    uses: actions/checkout@v4

  - name: Set up Ruby
    uses: ruby/setup-ruby@v1
    with:
      ruby-version: .ruby-version
      bundler-cache: true

  - name: Run tests
    env:
      RAILS_ENV: test
      # REDIS_URL: redis://localhost:6379/0
    run: bin/rails db:test:prepare test test:system

  - name: Keep screenshots from failed system tests
    uses: actions/upload-artifact@v4
    if: failure()
    with:
      name: screenshots
      path: ${{ github.workspace }}/tmp/screenshots
      if-no-files-found: ignore

File: examples/aws-rds-instance-mysql-public/package.json

{
"name": "aws-rds-instance-mysql-public-example",
"version": "1.0.0",
"description": "",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"sst": "file:../../sdk/js"
},
"devDependencies": {
}
}


File: examples/aws-rds-instance-mysql-public/tsconfig.json

{}


File: examples/aws-react-router/package.json

{
"name": "aws-react-router",
"private": true,
"type": "module",
"scripts": {
"build": "react-router build",
"dev": "react-router dev",
"start": "react-router-serve ./build/server/index.js",
"typecheck": "react-router typegen && tsc"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.796.0",
"@aws-sdk/s3-request-presigner": "^3.796.0",
"@react-router/node": "^7.5.2",
"@react-router/serve": "^7.5.2",
"isbot": "^5.1.17",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-router": "^7.5.2",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@react-router/dev": "^7.5.2",
"@tailwindcss/vite": "^4.0.0",
"@types/node": "^20",
"@types/react": "^19.0.1",
"@types/react-dom": "^19.0.1",
"react-router-devtools": "^1.1.0",
"tailwindcss": "^4.0.0",
"typescript": "^5.7.2",
"vite": "^5.4.11",
"vite-tsconfig-paths": "^5.1.4"
}
}


File: examples/aws-react-router/tsconfig.json

{
"include": [
"/*",
"
/.server//*",
"
/.client//*",
".react-router/types/
/"
],
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ES2022"],
"types": ["node", "vite/client"],
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "bundler",
"jsx": "react-jsx",
"rootDirs": [".", "./.react-router/types"],
"baseUrl": ".",
"paths": {
"~/
": ["./app/*"]
},
"esModuleInterop": true,
"verbatimModuleSyntax": true,
"noEmit": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true
},"exclude":["sst.config.ts"]
}


File: examples/aws-realtime/package.json

{
"name": "aws-realtime",
"workspaces": [
"web"
],
"version": "1.0.0",
"description": "",
"type": "module",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"sst": "file:../../sdk/js"
},
"dependencies": {
"@aws-sdk/client-iot-data-plane": "^3.569.0"
}
}


File: examples/aws-realtime/tsconfig.json

{}


File: examples/aws-realtime/web/package.json

{
"name": "web",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "sst dev vite",
"build": "tsc && vite build",
"preview": "vite preview"
},
"dependencies": {
"@paralleldrive/cuid2": "^2.2.2",
"aws-iot-device-sdk-v2": "1.13.1",
"events": "^3.3.0"
},
"devDependencies": {
"typescript": "^5.2.2",
"vite": "^5.2.0"
}
}


File: examples/aws-realtime/web/tsconfig.json

{
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"module": "ESNext",
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"skipLibCheck": true,

text
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,

/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true

},
"include": ["src"]
}


File: examples/aws-realtime-nextjs/package.json

{
"name": "aws-realtime-nextjs",
"version": "0.1.0",
"private": true,
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
},
"dependencies": {
"mqtt": "^5.10.1",
"next": "14.2.3",
"react": "^18",
"react-dom": "^18",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"typescript": "^5"
}
}


File: examples/aws-realtime-nextjs/tsconfig.json

{
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/": ["./"]
}
},
"include": ["next-env.d.ts", "/*.ts", "/.tsx", ".next/types/**/.ts"],
"exclude": ["node_modules","sst.config.ts"]
}


File: examples/aws-redis/package.json

{
"name": "aws-redis",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "index.js",
"scripts": {
"deploy": "go run ../../cmd/sst deploy",
"remove": "go run ../../cmd/sst remove",
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"ioredis": "^5.4.1",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-redis-local/package.json

{
"name": "aws-redis-local",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"ioredis": "^5.4.1",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-redis-local/tsconfig.json

{}


File: examples/aws-remix/package.json

{
"name": "aws-remix",
"private": true,
"sideEffects": false,
"type": "module",
"scripts": {
"build": "remix vite:build",
"dev": "remix vite:dev",
"lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .",
"start": "remix-serve ./build/server/index.js",
"typecheck": "tsc"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.699.0",
"@aws-sdk/s3-request-presigner": "^3.699.0",
"@remix-run/node": "^2.15.0",
"@remix-run/react": "^2.15.0",
"@remix-run/serve": "^2.15.0",
"isbot": "^4.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@remix-run/dev": "^2.15.0",
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.7.4",
"@typescript-eslint/parser": "^6.7.4",
"autoprefixer": "^10.4.19",
"eslint": "^8.38.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"postcss": "^8.4.38",
"tailwindcss": "^3.4.4",
"typescript": "^5.1.6",
"vite": "^5.1.0",
"vite-tsconfig-paths": "^4.2.1"
},
"engines": {
"node": ">=20.0.0"
},
"overrides": {
"valibot": "^0.41.0"
}
}


File: examples/aws-remix/tsconfig.json

{
"include": [
"/*.ts",
"
/.tsx",
"/.server//
.ts",
"/.server//.tsx",
"/.client//
.ts",
"/.client//.tsx"
],
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ES2022"],
"types": ["@remix-run/node", "vite/client"],
"isolatedModules": true,
"esModuleInterop": true,
"jsx": "react-jsx",
"module": "ESNext",
"moduleResolution": "Bundler",
"resolveJsonModule": true,
"target": "ES2022",
"strict": true,
"allowJs": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"baseUrl": ".",
"paths": {
"~/
": ["./app/*"]
},

text
// Vite takes care of building everything, not tsc.
"noEmit": true

}
}


File: examples/aws-remix-container/package.json

{
"name": "aws-remix-container",
"private": true,
"sideEffects": false,
"type": "module",
"scripts": {
"build": "remix vite:build",
"dev": "remix vite:dev",
"lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .",
"start": "remix-serve ./build/server/index.js",
"typecheck": "tsc"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.701.0",
"@aws-sdk/s3-request-presigner": "^3.701.0",
"@remix-run/node": "^2.15.0",
"@remix-run/react": "^2.15.0",
"@remix-run/serve": "^2.15.0",
"isbot": "^4.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@remix-run/dev": "^2.15.0",
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.7.4",
"@typescript-eslint/parser": "^6.7.4",
"autoprefixer": "^10.4.19",
"eslint": "^8.38.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"postcss": "^8.4.38",
"tailwindcss": "^3.4.4",
"typescript": "^5.1.6",
"vite": "^5.1.0",
"vite-tsconfig-paths": "^4.2.1"
},
"engines": {
"node": ">=20.0.0"
},
"overrides": {
"valibot": "^0.41.0"
}
}


File: examples/aws-remix-container/tsconfig.json

{
"include": [
"/*.ts",
"
/.tsx",
"/.server//
.ts",
"/.server//.tsx",
"/.client//
.ts",
"/.client//.tsx"
],
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ES2022"],
"types": ["@remix-run/node", "vite/client"],
"isolatedModules": true,
"esModuleInterop": true,
"jsx": "react-jsx",
"module": "ESNext",
"moduleResolution": "Bundler",
"resolveJsonModule": true,
"target": "ES2022",
"strict": true,
"allowJs": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"baseUrl": ".",
"paths": {
"~/
": ["./app/*"]
},

text
// Vite takes care of building everything, not tsc.
"noEmit": true

}
}


File: examples/aws-remix-redis/package.json

{
"name": "aws-remix-redis",
"private": true,
"sideEffects": false,
"type": "module",
"scripts": {
"build": "remix vite:build",
"dev": "remix vite:dev",
"lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .",
"start": "remix-serve ./build/server/index.js",
"typecheck": "tsc"
},
"dependencies": {
"@remix-run/node": "^2.12.1",
"@remix-run/react": "^2.12.1",
"@remix-run/serve": "^2.12.1",
"ioredis": "^5.4.1",
"isbot": "^4.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@remix-run/dev": "^2.12.1",
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.7.4",
"@typescript-eslint/parser": "^6.7.4",
"autoprefixer": "^10.4.19",
"eslint": "^8.38.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"postcss": "^8.4.38",
"tailwindcss": "^3.4.4",
"typescript": "^5.1.6",
"vite": "^5.1.0",
"vite-tsconfig-paths": "^4.2.1"
},
"engines": {
"node": ">=20.0.0"
}
}


File: examples/aws-remix-redis/tsconfig.json

{
"include": [
"/*.ts",
"
/.tsx",
"/.server//
.ts",
"/.server//.tsx",
"/.client//
.ts",
"/.client//.tsx"
],
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ES2022"],
"types": ["@remix-run/node", "vite/client"],
"isolatedModules": true,
"esModuleInterop": true,
"jsx": "react-jsx",
"module": "ESNext",
"moduleResolution": "Bundler",
"resolveJsonModule": true,
"target": "ES2022",
"strict": true,
"allowJs": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"baseUrl": ".",
"paths": {
"~/
": ["./app/*"]
},

text
// Vite takes care of building everything, not tsc.
"noEmit": true

}
}


File: examples/aws-remix-stream/package.json

{
"name": "aws-remix-stream",
"private": true,
"sideEffects": false,
"type": "module",
"scripts": {
"build": "remix vite:build",
"dev": "remix vite:dev",
"lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .",
"start": "remix-serve ./build/server/index.js",
"typecheck": "tsc"
},
"dependencies": {
"@remix-run/node": "^2.12.1",
"@remix-run/react": "^2.12.1",
"@remix-run/serve": "^2.12.1",
"isbot": "^4.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@remix-run/dev": "^2.12.1",
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.7.4",
"@typescript-eslint/parser": "^6.7.4",
"eslint": "^8.38.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"typescript": "^5.1.6",
"vite": "^5.1.0",
"vite-tsconfig-paths": "^4.2.1"
},
"engines": {
"node": ">=18.0.0"
}
}


File: examples/aws-remix-stream/tsconfig.json

{
"include": [
"/*.ts",
"
/.tsx",
"/.server//
.ts",
"/.server//.tsx",
"/.client//
.ts",
"/.client//.tsx"
],
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ES2022"],
"types": ["@remix-run/node", "vite/client"],
"isolatedModules": true,
"esModuleInterop": true,
"jsx": "react-jsx",
"module": "ESNext",
"moduleResolution": "Bundler",
"resolveJsonModule": true,
"target": "ES2022",
"strict": true,
"allowJs": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"baseUrl": ".",
"paths": {
"~/
": ["./app/*"]
},

text
// Vite takes care of building everything, not tsc.
"noEmit": true

}
}


File: examples/aws-router/package.json

{
"name": "aws-router",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-router-bucket/package.json

{
"name": "aws-router-bucket",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-router-protection/package.json

{
"name": "aws-router-protection",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-rust-cluster/docker-compose.yml

services:
api:
build:
context: .
dockerfile: ./Dockerfile
ports:
- 80:80
expose:
- 80


File: examples/aws-rust-cluster/package.json

{
"name": "aws-rust-cluster",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"@types/aws-lambda": "8.10.145",
"sst": "file:../../sdk/js",
"sst-linux-x64": "^4"
},
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-rust-cluster/tsconfig.json

{}


File: examples/aws-rust-loco/config/development.yaml

Loco configuration file documentation

Application logging configuration

logger:

Enable or disable logging.

enable: true

Enable pretty backtrace (sets RUST_BACKTRACE=1)

pretty_backtrace: false

Log level, options: trace, debug, info, warn or error.

level: info

Define the logging format. options: compact, pretty or json

format: json

By default the logger has filtering only logs that came from your code or logs that came from `loco` framework. to see all third party libraries

Uncomment the line below to override to see all third party libraries you can enable this config and override the logger filters.

override_filter: trace

Web server configuration

server:

Port on which the server will listen. the server binding is 0.0.0.0:{PORT}

port: 5150
binding: 0.0.0.0

The UI hostname or IP address that mailers will point to.

host: http://localhost

Out of the box middleware configuration. to disable middleware you can changed the `enable` field to `false` of comment the middleware block

middlewares:
# Enable Etag cache header middleware
etag:
enable: true
# Allows to limit the payload size request. payload that bigger than this file will blocked the request.
limit_payload:
# Enable/Disable the middleware.
enable: true
# the limit size. can be b,kb,kib,mb,mib,gb,gib
body_limit: 5mb
# set secure headers
secure_headers:
preset: github
# calculate remote IP based on X-Forwarded-For when behind a proxy or load balancer
# use RemoteIP(..) extractor to get the remote IP.
# without this middleware, you'll get the proxy IP instead.
# For more: https://github.com/rails/rails/blob/main/actionpack/lib/action_dispatch/middleware/remote_ip.rb
#
# NOTE! only enable when under a proxy, otherwise this can lead to IP spoofing vulnerabilities
# trust me, you'll know if you need this middleware.
remote_ip:
enable: false
# # replace the default trusted proxies:
# trusted_proxies:
# - ip range 1
# - ip range 2 ..
# Generating a unique request ID and enhancing logging with additional information such as the start and completion of request processing, latency, status code, and other request details.
logger:
# Enable/Disable the middleware.
enable: true
# when your code is panicked, the request still returns 500 status code.
catch_panic:
# Enable/Disable the middleware.
enable: true
# Timeout for incoming requests middleware. requests that take more time from the configuration will cute and 408 status code will returned.
timeout_request:
# Enable/Disable the middleware.
enable: false
# Duration time in milliseconds.
timeout: 5000
cors:
enable: true
# Set the value of the [Access-Control-Allow-Origin][mdn] header
# allow_origins:
# - https://loco.rs
# Set the value of the [Access-Control-Allow-Headers][mdn] header
# allow_headers:
# - Content-Type
# Set the value of the [Access-Control-Allow-Methods][mdn] header
# allow_methods:
# - POST
# Set the value of the [Access-Control-Max-Age][mdn] header in seconds
# max_age: 3600

Worker Configuration

workers:

specifies the worker mode. Options:

- BackgroundQueue - Workers operate asynchronously in the background, processing queued.

- ForegroundBlocking - Workers operate in the foreground and block until tasks are completed.

- BackgroundAsync - Workers operate asynchronously in the background, processing tasks with async capabilities.

mode: BackgroundQueue

Mailer Configuration.

mailer:

SMTP mailer configuration.

smtp:
# Enable/Disable smtp mailer.
enable: false
# SMTP server host. e.x localhost, smtp.gmail.com
host: {{ get_env(name="MAILER_HOST", default="localhost") }}
# SMTP server port
port: 1025
# Use secure connection (SSL/TLS).
secure: false
# auth:
# user:
# password:

Initializers Configuration

initializers:

oauth2:

authorization_code: # Authorization code grant type

- client_identifier: google # Identifier for the OAuth2 provider. Replace 'google' with your provider's name if different, must be unique within the oauth2 config.

... other fields

Database Configuration

database:

Database connection URI

uri: {{ get_env(name="DATABASE_URL", default="postgres://loco:loco@localhost:5432/server_development") }}

When enabled, the sql query will be logged.

enable_logging: false

Set the timeout duration when acquiring a connection.

connect_timeout: {{ get_env(name="DB_CONNECT_TIMEOUT", default="500") }}

Set the idle duration before closing a connection.

idle_timeout: 500

Minimum number of connections for a pool.

min_connections: 1

Maximum number of connections for a pool.

max_connections: 1

Run migration up when application loaded

auto_migrate: false

Truncate database when application loaded. This is a dangerous operation, make sure that you using this flag only on dev environments or test mode

dangerously_truncate: false

Recreating schema when application loaded. This is a dangerous operation, make sure that you using this flag only on dev environments or test mode

dangerously_recreate: false

Queue Configuration

queue:

Redis connection URI

uri: {{ get_env(name="REDIS_URL", default="redis://127.0.0.1") }}

Dangerously flush all data in Redis on startup. dangerous operation, make sure that you using this flag only on dev environments or test mode

dangerously_flush: false

Authentication Configuration

auth:

JWT authentication

jwt:
# Secret key for token generation and verification
secret: KRVK4VAddJ3zV8IkOCTh
# Token expiration time in seconds
expiration: 604800 # 7 days


File: examples/aws-rust-loco/config/test.yaml

Loco configuration file documentation

Application logging configuration

logger:

Enable or disable logging.

enable: false

Log level, options: trace, debug, info, warn or error.

level: debug

Define the logging format. options: compact, pretty or json

format: compact

By default the logger has filtering only logs that came from your code or logs that came from `loco` framework. to see all third party libraries

Uncomment the line below to override to see all third party libraries you can enable this config and override the logger filters.

override_filter: trace

Web server configuration

server:

Port on which the server will listen. the server binding is 0.0.0.0:{PORT}

port: 5150

The UI hostname or IP address that mailers will point to.

host: http://localhost

Out of the box middleware configuration. to disable middleware you can changed the `enable` field to `false` of comment the middleware block

middlewares:
# Allows to limit the payload size request. payload that bigger than this file will blocked the request.
limit_payload:
# Enable/Disable the middleware.
enable: true
# the limit size. can be b,kb,kib,mb,mib,gb,gib
body_limit: 5mb
# Generating a unique request ID and enhancing logging with additional information such as the start and completion of request processing, latency, status code, and other request details.
logger:
# Enable/Disable the middleware.
enable: true
# when your code is panicked, the request still returns 500 status code.
catch_panic:
# Enable/Disable the middleware.
enable: true
# Timeout for incoming requests middleware. requests that take more time from the configuration will cute and 408 status code will returned.
timeout_request:
# Enable/Disable the middleware.
enable: false
# Duration time in milliseconds.
timeout: 5000
cors:
enable: true
# Set the value of the [Access-Control-Allow-Origin][mdn] header
# allow_origins:
# - https://loco.rs
# Set the value of the [Access-Control-Allow-Headers][mdn] header
# allow_headers:
# - Content-Type
# Set the value of the [Access-Control-Allow-Methods][mdn] header
# allow_methods:
# - POST
# Set the value of the [Access-Control-Max-Age][mdn] header in seconds
# max_age: 3600

Worker Configuration

workers:

specifies the worker mode. Options:

- BackgroundQueue - Workers operate asynchronously in the background, processing queued.

- ForegroundBlocking - Workers operate in the foreground and block until tasks are completed.

- BackgroundAsync - Workers operate asynchronously in the background, processing tasks with async capabilities.

mode: ForegroundBlocking

Mailer Configuration.

mailer:

SMTP mailer configuration.

smtp:
# Enable/Disable smtp mailer.
enable: true
# SMTP server host. e.x localhost, smtp.gmail.com
host: localhost
# SMTP server port
port: 1025
# Use secure connection (SSL/TLS).
secure: false
# auth:
# user:
# password:
stub: true

Initializers Configuration

initializers:

oauth2:

authorization_code: # Authorization code grant type

- client_identifier: google # Identifier for the OAuth2 provider. Replace 'google' with your provider's name if different, must be unique within the oauth2 config.

... other fields

Database Configuration

database:

Database connection URI

uri: {{get_env(name="DATABASE_URL", default="postgres://loco:loco@localhost:5432/server_test")}}

When enabled, the sql query will be logged.

enable_logging: false

Set the timeout duration when acquiring a connection.

connect_timeout: {{ get_env(name="DB_CONNECT_TIMEOUT", default="500") }}

Set the idle duration before closing a connection.

idle_timeout: 500

Minimum number of connections for a pool.

min_connections: 1

Maximum number of connections for a pool.

max_connections: 1

Run migration up when application loaded

auto_migrate: true

Truncate database when application loaded. This is a dangerous operation, make sure that you using this flag only on dev environments or test mode

dangerously_truncate: true

Recreating schema when application loaded. This is a dangerous operation, make sure that you using this flag only on dev environments or test mode

dangerously_recreate: false

Queue Configuration

queue:

Redis connection URI

uri: {{get_env(name="REDIS_URL", default="redis://127.0.0.1")}}

Dangerously flush all data in Redis on startup. dangerous operation, make sure that you using this flag only on dev environments or test mode

dangerously_flush: false

Authentication Configuration

auth:

JWT authentication

jwt:
# Secret key for token generation and verification
secret: jFb88JjbJsVEsVdwNa8U
# Token expiration time in seconds
expiration: 604800 # 7 days


File: examples/aws-rust-loco/src/fixtures/notes.yaml


  • id: 1
    title: Loco note 1
    content: Loco note 1 content
    created_at: "2023-11-12T12:34:56.789Z"
    updated_at: "2023-11-12T12:34:56.789Z"
  • id: 2
    title: Loco note 2
    content: Loco note 2 content
    created_at: "2023-11-12T12:34:56.789Z"
    updated_at: "2023-11-12T12:34:56.789Z"

File: examples/aws-rust-loco/src/fixtures/users.yaml


  • id: 1
    pid: 11111111-1111-1111-1111-111111111111
    email: [email protected]
    password: "$argon2id$v=19$m=19456,t=2,p=1$ETQBx4rTgNAZhSaeYZKOZg$eYTdH26CRT6nUJtacLDEboP0li6xUwUF/q5nSlQ8uuc"
    api_key: lo-95ec80d7-cb60-4b70-9b4b-9ef74cb88758
    name: user1
    created_at: "2023-11-12T12:34:56.789Z"
    updated_at: "2023-11-12T12:34:56.789Z"
  • id: 2
    pid: 22222222-2222-2222-2222-222222222222
    email: [email protected]
    password: "$argon2id$v=19$m=19456,t=2,p=1$ETQBx4rTgNAZhSaeYZKOZg$eYTdH26CRT6nUJtacLDEboP0li6xUwUF/q5nSlQ8uuc"
    api_key: lo-153561ca-fa84-4e1b-813a-c62526d0a77e
    name: user2
    created_at: "2023-11-12T12:34:56.789Z"
    updated_at: "2023-11-12T12:34:56.789Z"

File: examples/aws-rust-loco/.github/workflows/ci.yaml

name: CI
on:
push:
branches:
- master
- main
pull_request:

env:
RUST_TOOLCHAIN: stable
TOOLCHAIN_PROFILE: minimal

jobs:
rustfmt:
name: Check Style
runs-on: ubuntu-latest

text
permissions:
  contents: read

steps:
  - name: Checkout the code
    uses: actions/checkout@v4
  - uses: dtolnay/rust-toolchain@stable
    with:
      toolchain: ${{ env.RUST_TOOLCHAIN }}
      components: rustfmt
  - name: Run cargo fmt
    uses: actions-rs/cargo@v1
    with:
      command: fmt
      args: --all -- --check

clippy:
name: Run Clippy
runs-on: ubuntu-latest

text
permissions:
  contents: read

steps:
  - name: Checkout the code
    uses: actions/checkout@v4
  - uses: dtolnay/rust-toolchain@stable
    with:
      toolchain: ${{ env.RUST_TOOLCHAIN }}
  - name: Setup Rust cache
    uses: Swatinem/rust-cache@v2
  - name: Run cargo clippy
    uses: actions-rs/cargo@v1
    with:
      command: clippy
      args: --all-features -- -D warnings -W clippy::pedantic -W clippy::nursery -W rust-2018-idioms

test:
name: Run Tests
runs-on: ubuntu-latest

text
permissions:
  contents: read

services:
  redis:
    image: redis
    options: >-
      --health-cmd "redis-cli ping"
      --health-interval 10s
      --health-timeout 5s
      --health-retries 5
    ports:
      - "6379:6379"
  postgres:
    image: postgres
    env:
      POSTGRES_DB: postgres_test
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres
    ports:
      - "5432:5432"
    # Set health checks to wait until postgres has started
    options: --health-cmd pg_isready
      --health-interval 10s
      --health-timeout 5s
      --health-retries 5

steps:
  - name: Checkout the code
    uses: actions/checkout@v4
  - uses: dtolnay/rust-toolchain@stable
    with:
      toolchain: ${{ env.RUST_TOOLCHAIN }}
  - name: Setup Rust cache
    uses: Swatinem/rust-cache@v2
  - name: Run cargo test
    uses: actions-rs/cargo@v1
    with:
      command: test
      args: --all-features --all
    env:
      REDIS_URL: redis://localhost:${{job.services.redis.ports[6379]}}
      DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres_test

File: examples/aws-service-discovery/package.json

{
"name": "aws-service-discovery",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.21.1",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "8.10.145"
}
}


File: examples/aws-service-discovery/tsconfig.json

{}


File: examples/aws-service-transform-container/package.json

{
"name": "aws-service-transform-container",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.21.1",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-service-transform-container/tsconfig.json

{}


File: examples/aws-shared-alb/package.json

{
"name": "aws-shared-alb",
"version": "1.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-shared-alb/api/package.json

{
"name": "api",
"version": "1.0.0",
"dependencies": {
"express": "^4.21.1"
}
}


File: examples/aws-shared-alb/web/package.json

{
"name": "web",
"version": "1.0.0",
"dependencies": {
"express": "^4.21.1"
}
}


File: examples/aws-shared-alb-static/package.json

{
"name": "aws-shared-alb-static",
"version": "1.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-shared-alb-static/api/package.json

{
"name": "api",
"version": "1.0.0",
"dependencies": {
"express": "^4.21.1"
}
}


File: examples/aws-shared-alb-static/web/package.json

{
"name": "web",
"version": "1.0.0",
"dependencies": {
"express": "^4.21.1"
}
}


File: examples/aws-sharp/package.json

{
"name": "aws-sharp",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"sharp": "^0.33.5",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "8.10.145"
}
}


File: examples/aws-sharp/tsconfig.json

{
"compilerOptions": {
"esModuleInterop": true
}
}


File: examples/aws-solid/package.json

{
"name": "aws-solid",
"type": "module",
"scripts": {
"build": "vinxi build",
"dev": "vinxi dev",
"start": "vinxi start",
"version": "vinxi version"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.670.0",
"@aws-sdk/s3-request-presigner": "^3.670.0",
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.14.8",
"@solidjs/start": "^1.0.8",
"solid-js": "^1.9.1",
"sst": "file:../../sdk/js",
"vinxi": "^0.4.3"
},
"engines": {
"node": ">=18"
},
"overrides": {
"nitropack": "npm:nitropack-nightly@latest"
}
}


File: examples/aws-solid/tsconfig.json

{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"jsx": "preserve",
"jsxImportSource": "solid-js",
"allowJs": true,
"strict": true,
"noEmit": true,
"types": ["vinxi/types/client"],
"isolatedModules": true,
"paths": {
"~/": ["./src/"]
}
}
}


File: examples/aws-solid-container/package.json

{
"name": "aws-solid-container",
"type": "module",
"scripts": {
"build": "vinxi build",
"dev": "vinxi dev",
"start": "vinxi start",
"version": "vinxi version"
},
"dependencies": {
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.14.8",
"@solidjs/start": "^1.0.8",
"ioredis": "^5.4.1",
"solid-js": "^1.9.1",
"sst": "file:../../sdk/js",
"vinxi": "^0.4.3"
},
"engines": {
"node": ">=18"
},
"overrides": {
"nitropack": "npm:nitropack-nightly@latest"
}
}


File: examples/aws-solid-container/tsconfig.json

{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"jsx": "preserve",
"jsxImportSource": "solid-js",
"allowJs": true,
"strict": true,
"noEmit": true,
"types": ["vinxi/types/client"],
"isolatedModules": true,
"paths": {
"~/": ["./src/"]
}
}
}


File: examples/aws-solid-container-ws/package.json

{
"name": "aws-solid-container-ws",
"type": "module",
"scripts": {
"build": "vinxi build",
"dev": "vinxi dev",
"start": "vinxi start",
"version": "vinxi version"
},
"dependencies": {
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.14.7",
"@solidjs/start": "^1.0.8",
"solid-js": "^1.9.1",
"sst": "file:../../sdk/js",
"vinxi": "^0.4.3"
},
"engines": {
"node": ">=18"
}
}


File: examples/aws-solid-container-ws/tsconfig.json

{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"jsx": "preserve",
"jsxImportSource": "solid-js",
"allowJs": true,
"strict": true,
"noEmit": true,
"types": ["vinxi/types/client"],
"isolatedModules": true,
"paths": {
"~/": ["./src/"]
}
}
}


File: examples/aws-static-site/package.json

{
"name": "aws-static-site",
"version": "1.0.0",
"main": "index.js",
"devDependencies": {
"sst": "file:../../sdk/js"
},
"scripts": {
"dev": "npx --yes serve ./site"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": ""
}


File: examples/aws-static-site-basic-auth/package.json

{
"name": "aws-static-site-basic-auth",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-step-functions/package.json

{
"name": "aws-step-functions",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "index.js",
"scripts": {
"deploy": "go run ../../cmd/sst deploy",
"remove": "go run ../../cmd/sst remove",
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-step-functions/tsconfig.json

{}


File: examples/aws-step-functions-task-token/package.json

{
"name": "aws-step-functions-task-token",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "index.js",
"scripts": {
"deploy": "go run ../../cmd/sst deploy",
"remove": "go run ../../cmd/sst remove",
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@aws-sdk/client-sfn": "^3.812.0",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "^8.10.11"
}
}


File: examples/aws-step-functions-task-token/tsconfig.json

{}


File: examples/aws-supabase-drizzle/package.json

{
"name": "aws-supabase-drizzle",
"version": "0.0.0",
"type": "module",
"scripts": {
"db": "sst shell drizzle-kit",
"db:studio": "sst shell drizzle-kit studio",
"db:migrate": "sst shell drizzle-kit migrate"
},
"dependencies": {
"@aws-sdk/client-rds-data": "^3.564.0",
"drizzle-kit": "0.20.17-679add7",
"drizzle-orm": "^0.30.9",
"postgres": "^3.4.4",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-supabase-drizzle/tsconfig.json

{
"compilerOptions": {
"esModuleInterop": true,
}
}


File: examples/aws-supabase-drizzle/migrations/meta/0000_snapshot.json

{
"id": "60c8abb1-7e2d-4b3d-8bc3-68b4a51c8fb8",
"prevId": "00000000-0000-0000-0000-000000000000",
"version": "6",
"dialect": "postgresql",
"tables": {
"public.todo": {
"name": "todo",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": true
},
"description": {
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
}
},
"enums": {},
"schemas": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
}


File: examples/aws-supabase-drizzle/migrations/meta/_journal.json

{
"version": "5",
"dialect": "pg",
"entries": [
{
"idx": 0,
"version": "6",
"when": 1715012302701,
"tag": "0000_great_solo",
"breakpoints": true
}
]
}


File: examples/aws-svelte-container/package.json

{
"name": "aws-svelte-container",
"version": "0.0.1",
"type": "module",
"scripts": {
"build": "vite build",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"dev": "vite dev",
"preview": "vite preview"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/adapter-node": "^5.2.9",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"typescript": "^5.0.0",
"vite": "^5.0.3"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.701.0",
"@aws-sdk/s3-request-presigner": "^3.701.0",
"sst": "file:../../sdk/js",
"svelte-kit-sst": "2.43.5"
}
}


File: examples/aws-svelte-container/tsconfig.json

{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"moduleResolution": "bundler"
}
// Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
// except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
//
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
// from the referenced tsconfig.json - TypeScript does not merge them in
}


File: examples/aws-svelte-kit/package.json

{
"name": "aws-svelte-kit",
"version": "0.0.1",
"type": "module",
"scripts": {
"build": "vite build",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"dev": "vite dev",
"preview": "vite preview"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"typescript": "^5.0.0",
"vite": "^5.0.3"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.700.0",
"@aws-sdk/s3-request-presigner": "^3.700.0",
"sst": "file:../../sdk/js",
"svelte-kit-sst": "2.43.5"
}
}


File: examples/aws-svelte-kit/tsconfig.json

{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"moduleResolution": "bundler"
}
// Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
// except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
//
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
// from the referenced tsconfig.json - TypeScript does not merge them in
}


File: examples/aws-svelte-kit-remote-functions/package.json

{
"name": "aws-svelte-kit-remote-functions",
"private": true,
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"prepare": "svelte-kit sync || echo ''",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^6.1.0",
"@sveltejs/kit": "^2.43.2",
"@sveltejs/vite-plugin-svelte": "^6.2.0",
"@tailwindcss/vite": "^4.1.13",
"svelte": "^5.39.5",
"svelte-check": "^4.3.2",
"tailwindcss": "^4.1.13",
"typescript": "^5.9.2",
"vite": "^7.1.7"
},
"dependencies": {
"sst": "file:../../sdk/js",
"svelte-kit-sst": "latest"
}
}


File: examples/aws-svelte-kit-remote-functions/tsconfig.json

{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"moduleResolution": "bundler"
}
// Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
// except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
//
// To make changes to top-level options such as include and exclude, we recommend extending
// the generated config; see https://svelte.dev/docs/kit/configuration#typescript
}


File: examples/aws-svelte-kit-remote-functions/static/robots.txt

allow crawling everything by default

User-agent: *
Disallow:


File: examples/aws-svelte-redis/package.json

{
"name": "aws-svelte-redis",
"version": "0.0.1",
"private": true,
"scripts": {
"build": "vite build",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"dev": "vite dev",
"preview": "vite preview"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/adapter-node": "^5.2.6",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"svelte": "^4.2.7",
"svelte-check": "^4.0.0",
"typescript": "^5.0.0",
"vite": "^5.0.3"
},
"type": "module",
"dependencies": {
"ioredis": "^5.4.1",
"sst": "file:../../sdk/js",
"svelte-kit-sst": "2.43.5"
}
}


File: examples/aws-svelte-redis/tsconfig.json

{
"extends": "./.svelte-kit/tsconfig.json",
"include": [
"ambient.d.ts",
"non-ambient.d.ts",
"./types//$types.d.ts",
"../sst-env.d.ts",
"../vite.config.js",
"../vite.config.ts",
"../src/
/.js",
"../src/**/
.ts",
"../src//*.svelte",
"../tests/
/.js",
"../tests/**/
.ts",
"../tests/**/*.svelte"
],
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"moduleResolution": "bundler"
}
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
// except $lib which is handled by https://kit.svelte.dev/docs/configuration#files
//
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
// from the referenced tsconfig.json - TypeScript does not merge them in
}


File: examples/aws-t3/package.json

{
"name": "aws-t3",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"build": "next build",
"db:generate": "sst shell drizzle-kit generate",
"db:migrate": "sst shell drizzle-kit migrate",
"db:push": "sst shell drizzle-kit push",
"db:studio": "sst shell drizzle-kit studio",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
},
"dependencies": {
"@t3-oss/env-nextjs": "^0.10.1",
"@tanstack/react-query": "^5.50.0",
"@trpc/client": "^11.0.0-rc.446",
"@trpc/react-query": "^11.0.0-rc.446",
"@trpc/server": "^11.0.0-rc.446",
"drizzle-orm": "^0.35.1",
"geist": "^1.3.0",
"next": "^14.2.4",
"pg": "^8.13.1",
"postgres": "^3.4.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"server-only": "^0.0.1",
"sst": "file:../../sdk/js",
"superjson": "^2.2.1",
"zod": "^3.23.3"
},
"devDependencies": {
"@types/eslint": "^8.56.10",
"@types/node": "^20.14.10",
"@types/pg": "^8.11.10",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^8.1.0",
"@typescript-eslint/parser": "^8.1.0",
"drizzle-kit": "^0.26.2",
"eslint": "^8.57.0",
"eslint-config-next": "^14.2.4",
"eslint-plugin-drizzle": "^0.2.3",
"postcss": "^8.4.39",
"prettier": "^3.3.2",
"prettier-plugin-tailwindcss": "^0.6.5",
"tailwindcss": "^3.4.3",
"typescript": "^5.5.3"
},
"ct3aMetadata": {
"initVersion": "7.37.0"
},
"packageManager": "[email protected]"
}


File: examples/aws-t3/tsconfig.json

{
"compilerOptions": {
/* Base Options: */
"esModuleInterop": true,
"skipLibCheck": true,
"target": "es2022",
"allowJs": true,
"resolveJsonModule": true,
"moduleDetection": "force",
"isolatedModules": true,

text
/* Strictness */
"strict": true,
"noUncheckedIndexedAccess": true,
"checkJs": true,

/* Bundled projects */
"lib": ["dom", "dom.iterable", "ES2022"],
"noEmit": true,
"module": "ESNext",
"moduleResolution": "Bundler",
"jsx": "preserve",
"plugins": [{ "name": "next" }],
"incremental": true,

/* Path Aliases */
"baseUrl": ".",
"paths": {
  "~/*": ["./src/*"]
}

},
"include": [
".eslintrc.cjs",
"next-env.d.ts",
"/*.ts",
"
/.tsx",
"**/
.cjs",
"/*.js",
".next/types/
/*.ts"
],
"exclude": ["node_modules","sst.config.ts"]
}


File: examples/aws-tanstack-start/components.json

{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "",
"css": "src/styles.css",
"baseColor": "zinc",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
},
"iconLibrary": "lucide"
}


File: examples/aws-tanstack-start/package.json

{
"name": "aws-tanstack-start",
"private": true,
"type": "module",
"scripts": {
"dev": "vite dev --port 3000",
"build": "vite build",
"serve": "vite preview",
"test": "vitest run",
"lint": "eslint",
"format": "prettier",
"check": "prettier --write . && eslint --fix"
},
"dependencies": {
"@radix-ui/react-label": "^2.1.8",
"@radix-ui/react-select": "^2.2.6",
"@radix-ui/react-slider": "^1.3.6",
"@radix-ui/react-slot": "^1.2.4",
"@radix-ui/react-switch": "^1.2.6",
"@tailwindcss/vite": "^4.0.6",
"@tanstack/react-devtools": "^0.7.0",
"@tanstack/react-form": "^1.0.0",
"@tanstack/react-query": "^5.66.5",
"@tanstack/react-query-devtools": "^5.84.2",
"@tanstack/react-router": "^1.132.0",
"@tanstack/react-router-devtools": "^1.132.0",
"@tanstack/react-router-ssr-query": "^1.131.7",
"@tanstack/react-start": "^1.132.0",
"@tanstack/router-plugin": "^1.132.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"lucide-react": "^0.544.0",
"nitro": "latest",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"sst": "file:../../sdk/js",
"tailwind-merge": "^3.0.2",
"tailwindcss": "^4.0.6",
"tw-animate-css": "^1.3.6",
"vite-tsconfig-paths": "^5.1.4",
"zod": "^4.1.11"
},
"devDependencies": {
"@tanstack/devtools-vite": "^0.3.11",
"@tanstack/eslint-config": "^0.3.0",
"@testing-library/dom": "^10.4.0",
"@testing-library/react": "^16.2.0",
"@types/node": "^22.10.2",
"@types/react": "^19.2.0",
"@types/react-dom": "^19.2.0",
"@vitejs/plugin-react": "^5.0.4",
"jsdom": "^27.0.0",
"prettier": "^3.5.3",
"typescript": "^5.7.2",
"vite": "^7.1.7",
"vitest": "^3.0.5",
"web-vitals": "^5.1.0"
}
}


File: examples/aws-tanstack-start/tsconfig.json

{
"include": ["/*.ts", "/*.tsx", "eslint.config.js", "prettier.config.js", "vite.config.js"],

"compilerOptions": {
"target": "ES2022",
"jsx": "react-jsx",
"module": "ESNext",
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"types": ["vite/client"],

text
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": false,
"noEmit": true,

/* Linting */
"skipLibCheck": true,
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true,
"baseUrl": ".",
"paths": {
  "@/*": ["./src/*"]
}

}
}


File: examples/aws-tanstack-start/.cta.json

{
"projectName": "app",
"mode": "file-router",
"typescript": true,
"tailwind": true,
"packageManager": "pnpm",
"addOnOptions": {},
"git": true,
"version": 1,
"framework": "react-cra",
"chosenAddOns": [
"eslint",
"nitro",
"start",
"form",
"shadcn",
"tanstack-query"
]
}


File: examples/aws-tanstack-start/public/manifest.json

{
"short_name": "TanStack App",
"name": "Create TanStack App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}


File: examples/aws-tanstack-start/public/robots.txt

https://www.robotstxt.org/robotstxt.html

User-agent: *
Disallow:


File: examples/aws-task/package.json

{
"name": "aws-task",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-task/tsconfig.json

{
"compilerOptions": {
"esModuleInterop": true
}
}


File: examples/aws-task/image/package.json

{
"name": "image",
"version": "1.0.0",
"description": "",
"main": "index.js",
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"sst": "file:../../../sdk/js"
}
}


File: examples/aws-task-cron/package.json

{
"name": "aws-task-cron",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-task-cron/tsconfig.json

{
"compilerOptions": {
"esModuleInterop": true
}
}


File: examples/aws-topic/package.json

{
"name": "aws-topic",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "index.js",
"scripts": {
"deploy": "go run ../../cmd/sst deploy",
"remove": "go run ../../cmd/sst remove",
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@types/aws-lambda": "^8.10.149",
"sst": "file:../../sdk/js"
},
"dependencies": {
"@aws-sdk/client-sns": "^3.515.0"
}
}


File: examples/aws-trpc/package.json

{
"name": "aws-trpc",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@trpc/client": "^11.0.0-rc.528",
"@trpc/server": "^11.0.0-rc.528",
"sst": "file:../../sdk/js",
"zod": "^3.22.4"
},
"devDependencies": {
"@types/aws-lambda": "^8.10.145"
}
}


File: examples/aws-trpc/tsconfig.json

{}


File: examples/aws-vector/package.json

{
"name": "aws-vector",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "index.js",
"scripts": {
"deploy": "go run ../../cmd/sst deploy",
"remove": "go run ../../cmd/sst remove",
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"openai": "^4.44.0",
"sst": "file:../../sdk/js"
}
}


File: examples/aws-vite/package.json

{
"name": "aws-vite",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/react": "^18.2.56",
"@types/react-dom": "^18.2.19",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"@typescript-eslint/parser": "^7.0.2",
"@vitejs/plugin-react": "^4.2.1",
"eslint": "^8.56.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"typescript": "^5.2.2",
"vite": "^5.1.4"
}
}


File: examples/aws-vite/tsconfig.json

{
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,

text
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",

/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true

},
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]
}


File: examples/aws-vite/tsconfig.node.json

{
"compilerOptions": {
"composite": true,
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true,
"strict": true
},
"include": ["vite.config.ts"]
}


File: examples/aws-workflow/package.json

{
"name": "aws-workflow",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "index.js",
"scripts": {
"dev": "go run ../../cmd/sst dev",
"deploy": "go run ../../cmd/sst deploy",
"remove": "go run ../../cmd/sst remove",
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"sst": "file:../../sdk/js",
"@types/aws-lambda": "8.10.145"
}
}


File: examples/aws-workflow-bus/package.json

{
"name": "aws-workflow-bus",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "index.js",
"scripts": {
"dev": "go run ../../cmd/sst dev",
"deploy": "go run ../../cmd/sst deploy",
"remove": "go run ../../cmd/sst remove"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-workflow-bus/tsconfig.json

{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"esModuleInterop": true
}
}


File: examples/aws-workflow-cron/package.json

{
"name": "aws-workflow-cron",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "index.js",
"scripts": {
"dev": "go run ../../cmd/sst dev",
"deploy": "go run ../../cmd/sst deploy",
"remove": "go run ../../cmd/sst remove"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/aws-workflow-cron/tsconfig.json

{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"esModuleInterop": true
}
}


File: examples/aws-workflow-python/package.json

{
"name": "aws-workflow-python",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "index.js",
"scripts": {
"dev": "go run ../../cmd/sst dev",
"deploy": "go run ../../cmd/sst deploy",
"remove": "go run ../../cmd/sst remove",
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"sst": "file:../../sdk/js",
"@types/aws-lambda": "8.10.145"
},
"dependencies": {
"@aws/durable-execution-sdk-js": "1.0.2",
"@aws-sdk/client-lambda": "^3.714.0"
}
}


File: examples/aws-zero/package.json

{
"name": "aws-zero",
"version": "0.0.0",
"dependencies": {
"@rocicorp/zero": "^0.7.2024120400",
"sst": "file:../../sdk/js"
},
"trustedDependencies": [
"@rocicorp/zero-sqlite3"
]
}


File: examples/aws-zero/tsconfig.json

{}


File: examples/bad-decision/package.json

{
"name": "bad-decision",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/bad-decision/tsconfig.json

{}


File: examples/cloudflare-astro/package.json

{
"name": "cloudflare-astro",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/cloudflare": "^13",
"astro": "^6",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@cloudflare/workers-types": "^4"
}
}


File: examples/cloudflare-astro/tsconfig.json

{
"extends": "astro/tsconfigs/strict",
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}


File: examples/cloudflare-astro-v5/package.json

{
"name": "cloudflare-astro-v5",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/cloudflare": "^12.5.3",
"astro": "^5.8.1",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20260414.1"
}
}


File: examples/cloudflare-astro-v5/tsconfig.json

{
"extends": "astro/tsconfigs/strict",
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}


File: examples/cloudflare-auth/package.json

{
"name": "cloudflare-auth",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@cloudflare/workers-types": "^4.20240403.0",
"sst": "file:../../sdk/js"
}
}


File: examples/cloudflare-auth/tsconfig.json

{
"compilerOptions": {
"lib": ["esnext"],
"types": ["@cloudflare/workers-types"],
"moduleResolution": "bundler",
"module": "ESNext",
}
}


File: examples/cloudflare-cron/package.json

{
"name": "cloudflare-cron",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20240405.0"
}
}


File: examples/cloudflare-cron/tsconfig.json

{}


File: examples/cloudflare-d1/package.json

{
"name": "cloudflare-d1",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20240405.0"
}
}


File: examples/cloudflare-d1/tsconfig.json

{}


File: examples/cloudflare-d1-static/package.json

{
"name": "cloudflare-d1-static",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20240405.0"
}
}


File: examples/cloudflare-d1-static/tsconfig.json

{}


File: examples/cloudflare-durable-object/package.json

{
"name": "cloudflare-durable-object",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20240405.0"
}
}


File: examples/cloudflare-durable-object/tsconfig.json

{
"extends": "../tsconfig.json",
"compilerOptions": {
"types": ["@cloudflare/workers-types"]
}
}


File: examples/cloudflare-hono/package.json

{
"name": "cloudflare-hono",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"hono": "^4.11.4",
"sst": "../../sdk/js"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20260114.0"
}
}


File: examples/cloudflare-hono/tsconfig.json

{
"compilerOptions": {
"lib": ["esnext"],
"types": ["@cloudflare/workers-types"]
}
}


File: examples/cloudflare-hyperdrive-aws/package.json

{
"name": "cloudflare-hyperdrive-aws",
"version": "0.0.0",
"type": "module",
"dependencies": {
"postgres": "^3.4.5",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20250412.0"
}
}


File: examples/cloudflare-hyperdrive-aws/tsconfig.json

{
"compilerOptions": {
"lib": ["esnext"],
"types": ["@cloudflare/workers-types"],
"esModuleInterop": true
}
}


File: examples/cloudflare-hyperdrive-planetscale/package.json

{
"name": "cloudflare-hyperdrive-planetscale",
"version": "0.0.0",
"dependencies": {
"pg": "^8.20.0",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20240405.0",
"@types/pg": "^8.20.0"
}
}


File: examples/cloudflare-hyperdrive-planetscale/tsconfig.json

{
"compilerOptions": {
"esModuleInterop": true
}
}


File: examples/cloudflare-kv/package.json

{
"name": "cloudflare-kv",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20240405.0"
}
}


File: examples/cloudflare-kv/tsconfig.json

{}


File: examples/cloudflare-kv-static/package.json

{
"name": "cloudflare-kv-static",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20240405.0"
}
}


File: examples/cloudflare-kv-static/tsconfig.json

{
"compilerOptions": {
"strict": true,
"types": ["@cloudflare/workers-types"]
}
}


File: examples/cloudflare-queue/package.json

{
"name": "cloudflare-queue",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20240405.0"
}
}


File: examples/cloudflare-queue/tsconfig.json

{
"extends": "../tsconfig.json"
}


File: examples/cloudflare-rate-limit/package.json

{
"name": "cloudflare-rate-limit",
"version": "1.0.0",
"type": "module",
"dependencies": {
"@cloudflare/workers-types": "^4.20260426.1",
"sst": "file:../../sdk/js"
}
}


File: examples/cloudflare-rate-limit/tsconfig.json

{
"compilerOptions": {
"lib": ["esnext"],
"types": ["@cloudflare/workers-types"]
}
}


File: examples/cloudflare-react-router/package.json

{
"name": "cloudflare-react-router",
"private": true,
"type": "module",
"scripts": {
"build": "react-router build",
"cf-typegen": "wrangler types",
"dev": "react-router dev",
"preview": "npm run build && vite preview",
"typecheck": "react-router typegen && tsc -b"
},
"dependencies": {
"isbot": "^5.1.31",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"react-router": "^7.10.0",
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@cloudflare/vite-plugin": "^1.13.5",
"@cloudflare/workers-types": "^4.20251012.0",
"@react-router/dev": "^7.10.0",
"@tailwindcss/vite": "^4.1.13",
"@types/node": "^22.19.17",
"@types/react": "^19.1.13",
"@types/react-dom": "^19.1.9",
"tailwindcss": "^4.1.13",
"typescript": "^5.9.2",
"vite": "^7.1.7",
"vite-tsconfig-paths": "^5.1.4",
"wrangler": "^4.83.0"
}
}


File: examples/cloudflare-react-router/tsconfig.cloudflare.json

{
"extends": "./tsconfig.json",
"include": [
".react-router/types//*",
"app/
/",
"app//.server//
",
"app//.client//",
"workers/**/
"
],
"compilerOptions": {
"composite": true,
"strict": true,
"lib": ["DOM", "DOM.Iterable", "ES2022"],
"types": ["vite/client", "@cloudflare/workers-types"],
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "bundler",
"jsx": "react-jsx",
"baseUrl": ".",
"rootDirs": [".", "./.react-router/types"],
"paths": {
"~/": ["./app/"]
},
"esModuleInterop": true,
"resolveJsonModule": true
}
}


File: examples/cloudflare-react-router/tsconfig.json

{
"files": [],
"references": [
{ "path": "./tsconfig.node.json" },
{ "path": "./tsconfig.cloudflare.json" }
],
"compilerOptions": {
"checkJs": true,
"verbatimModuleSyntax": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true
}
}


File: examples/cloudflare-react-router/tsconfig.node.json

{
"extends": "./tsconfig.json",
"include": ["vite.config.ts"],
"compilerOptions": {
"composite": true,
"strict": true,
"types": ["node"],
"lib": ["ES2022"],
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "bundler"
}
}


File: examples/cloudflare-solid/package.json

{
"name": "cloudflare-solid",
"type": "module",
"scripts": {
"build": "vinxi build",
"dev": "vinxi dev",
"start": "vinxi start",
"version": "vinxi version"
},
"dependencies": {
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.15.0",
"@solidjs/start": "^1.1.0",
"solid-js": "^1.9.5",
"sst": "file:../../sdk/js",
"vinxi": "^0.5.7"
},
"engines": {
"node": ">=22"
}
}


File: examples/cloudflare-solid/tsconfig.json

{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"jsx": "preserve",
"jsxImportSource": "solid-js",
"allowJs": true,
"strict": true,
"noEmit": true,
"types": ["vinxi/types/client"],
"isolatedModules": true,
"paths": {
"~/": ["./src/"]
}
}
}


File: examples/cloudflare-tanstack-start/README.md

Welcome to your new TanStack Start app!

Getting Started

To run this application:

bash
bun install
bun --bun run dev

Building For Production

To build this application for production:

bash
bun --bun run build

Testing

This project uses Vitest for testing. You can run the tests with:

bash
bun --bun run test

Styling

This project uses Tailwind CSS for styling.

Removing Tailwind CSS

If you prefer not to use Tailwind CSS:

  1. Remove the demo pages in src/routes/demo/
  2. Replace the Tailwind import in src/styles.css with your own styles
  3. Remove tailwindcss() from the plugins array in vite.config.ts
  4. Uninstall the packages: bun install @tailwindcss/vite tailwindcss -D

Linting & Formatting

This project uses eslint and prettier for linting and formatting. Eslint is configured using tanstack/eslint-config. The following scripts are available:

bash
bun --bun run lint
bun --bun run format
bun --bun run check

Routing

This project uses TanStack Router with file-based routing. Routes are managed as files in src/routes.

Adding A Route

To add a new route to your application just add a new file in the ./src/routes directory.

TanStack will automatically generate the content of the route file for you.

Now that you have two routes you can use a Link component to navigate between them.

To use SPA (Single Page Application) navigation you will need to import the Link component from @tanstack/react-router.

tsx
import { Link } from "@tanstack/react-router";

Then anywhere in your JSX you can use it like so:

tsx
<Link to="/about">About</Link>

This will create a link that will navigate to the /about route.

More information on the Link component can be found in the Link documentation.

Using A Layout

In the File Based Routing setup the layout is located in src/routes/__root.tsx. Anything you add to the root route will appear in all the routes. The route content will appear in the JSX where you render {children} in the shellComponent.

Here is an example layout that includes a header:

tsx
import { HeadContent, Scripts, createRootRoute } from '@tanstack/react-router'

export const Route = createRootRoute({
  head: () => ({
    meta: [
      { charSet: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { title: 'My App' },
    ],
  }),
  shellComponent: ({ children }) => (
    <html lang="en">
      <head>
        <HeadContent />
      </head>
      <body>
        <header>
          <nav>
            <Link to="/">Home</Link>
            <Link to="/about">About</Link>
          </nav>
        </header>
        {children}
        <Scripts />
      </body>
    </html>
  ),
})

More information on layouts can be found in the Layouts documentation.

Server Functions

TanStack Start provides server functions that allow you to write server-side code that seamlessly integrates with your client components.

tsx
import { createServerFn } from '@tanstack/react-start'

const getServerTime = createServerFn({
  method: 'GET',
}).handler(async () => {
  return new Date().toISOString()
})

// Use in a component
function MyComponent() {
  const [time, setTime] = useState('')
  
  useEffect(() => {
    getServerTime().then(setTime)
  }, [])
  
  return <div>Server time: {time}</div>
}

API Routes

You can create API routes by using the server property in your route definitions:

tsx
import { createFileRoute } from '@tanstack/react-router'
import { json } from '@tanstack/react-start'

export const Route = createFileRoute('/api/hello')({
  server: {
    handlers: {
      GET: () => json({ message: 'Hello, World!' }),
    },
  },
})

Data Fetching

There are multiple ways to fetch data in your application. You can use TanStack Query to fetch data from a server. But you can also use the loader functionality built into TanStack Router to load the data for a route before it's rendered.

For example:

tsx
import { createFileRoute } from '@tanstack/react-router'

export const Route = createFileRoute('/people')({
  loader: async () => {
    const response = await fetch('https://swapi.dev/api/people')
    return response.json()
  },
  component: PeopleComponent,
})

function PeopleComponent() {
  const data = Route.useLoaderData()
  return (
    <ul>
      {data.results.map((person) => (
        <li key={person.name}>{person.name}</li>
      ))}
    </ul>
  )
}

Loaders simplify your data fetching logic dramatically. Check out more information in the Loader documentation.

Demo files

Files prefixed with demo can be safely deleted. They are there to provide a starting point for you to play around with the features you've installed.

Learn More

You can learn more about all of the offerings from TanStack in the TanStack documentation.

For TanStack Start specific documentation, visit TanStack Start.


File: examples/cloudflare-tanstack-start/package.json

{
"name": "cloudflare-tanstack-start",
"private": true,
"type": "module",
"imports": {
"#/": "./src/"
},
"scripts": {
"dev": "vite dev --port 3000",
"build": "vite build",
"preview": "vite preview",
"test": "vitest run",
"lint": "eslint",
"format": "prettier --check .",
"check": "prettier --write . && eslint --fix",
"deploy": "bun run build && wrangler deploy"
},
"dependencies": {
"@cloudflare/vite-plugin": "^1.26.0",
"@tailwindcss/vite": "^4.1.18",
"@tanstack/react-devtools": "latest",
"@tanstack/react-router": "latest",
"@tanstack/react-router-devtools": "latest",
"@tanstack/react-router-ssr-query": "latest",
"@tanstack/react-start": "latest",
"@tanstack/router-plugin": "^1.132.0",
"lucide-react": "^0.545.0",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"sst": "file:../../sdk/js",
"tailwindcss": "^4.1.18"
},
"devDependencies": {
"@tailwindcss/typography": "^0.5.16",
"@tanstack/devtools-vite": "latest",
"@tanstack/eslint-config": "latest",
"@testing-library/dom": "^10.4.1",
"@testing-library/react": "^16.3.0",
"@types/node": "^22.10.2",
"@types/react": "^19.2.0",
"@types/react-dom": "^19.2.0",
"@vitejs/plugin-react": "^6.0.1",
"jsdom": "^28.1.0",
"prettier": "^3.8.1",
"typescript": "^5.7.2",
"vite": "^8.0.0",
"vitest": "^3.0.5",
"wrangler": "^4.70.0"
},
"pnpm": {
"onlyBuiltDependencies": [
"esbuild",
"lightningcss"
]
}
}


File: examples/cloudflare-tanstack-start/tsconfig.json

{
"include": ["/*.ts", "/*.tsx", "eslint.config.js", "prettier.config.js", "vite.config.js"],

"compilerOptions": {
"target": "ES2022",
"jsx": "react-jsx",
"module": "ESNext",
"baseUrl": ".",
"paths": {
"#/": ["./src/"],
"@/": ["./src/"]
},
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"types": ["vite/client"],

text
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"noEmit": true,

/* Linting */
"skipLibCheck": true,
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true

}
}


File: examples/cloudflare-tanstack-start/.cta.json

{
"projectName": "cloudflare-tanstack-start",
"mode": "file-router",
"typescript": true,
"tailwind": true,
"packageManager": "bun",
"git": false,
"install": true,
"addOnOptions": {},
"includeExamples": false,
"envVarValues": {},
"routerOnly": false,
"version": 1,
"framework": "react",
"chosenAddOns": [
"eslint",
"cloudflare"
]
}


File: examples/cloudflare-tanstack-start/public/manifest.json

{
"short_name": "TanStack App",
"name": "Create TanStack App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}


File: examples/cloudflare-tanstack-start/public/robots.txt

https://www.robotstxt.org/robotstxt.html

User-agent: *
Disallow:


File: examples/cloudflare-trpc/package.json

{
"name": "cloudflare-trpc",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@trpc/client": "^11.0.0-rc.359",
"@trpc/server": "^11.0.0-rc.359",
"sst": "file:../../sdk/js",
"zod": "^3.23.5"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20240405.0"
}
}


File: examples/cloudflare-trpc/tsconfig.json

{
"compilerOptions": {
"lib": ["esnext"],
"types": ["@cloudflare/workers-types"]
}
}


File: examples/cloudflare-vite/package.json

{
"name": "cloudflare-vite",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
"react": "^19.2.4",
"react-dom": "^19.2.4"
},
"devDependencies": {
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^5.1.4",
"typescript": "^5.2.2",
"vite": "^7.3.1"
}
}


File: examples/cloudflare-vite/tsconfig.json

{
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,

text
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",

/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true

},
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]
}


File: examples/cloudflare-vite/tsconfig.node.json

{
"compilerOptions": {
"composite": true,
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true,
"strict": true
},
"include": ["vite.config.ts"]
}


File: examples/cloudflare-worker/package.json

{
"name": "cloudflare-worker",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@cloudflare/workers-types": "^4.20240403.0",
"sst": "file:../../sdk/js"
}
}


File: examples/cloudflare-worker/tsconfig.json

{
"compilerOptions": {
"lib": ["esnext"],
"types": ["@cloudflare/workers-types"]
}
}


File: examples/cloudflare-workflow/package.json

{
"name": "cloudflare-workflow",
"version": "1.0.0",
"type": "module",
"dependencies": {
"@cloudflare/workers-types": "^4.20240403.0",
"sst": "file:../../sdk/js"
}
}


File: examples/cloudflare-workflow/tsconfig.json

{
"compilerOptions": {
"lib": ["esnext"],
"types": ["@cloudflare/workers-types"]
}
}


File: examples/hetzner/package.json

{
"name": "hetzner",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/hetzner/tsconfig.json

{}


File: examples/hetzner-minecraft/package.json

{
"name": "hetzner-minecraft",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/python-layouts/nested-layout/app/data/config.json

{
"app_name": "nested-example",
"feature_flag": true
}


{
"name": "secret-link-all",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" \u0026\u0026 exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"sst": "file:../../sdk/js"
},
"devDependencies": {
"@types/aws-lambda": "8.10.137"
}
}


{}


File: examples/sst-transform/package.json

{
"name": "sst-transform",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: examples/sst-transform/tsconfig.json

{}


File: examples/vercel-domain/package.json

{
"name": "vercel-domain",
"version": "0.0.0",
"dependencies": {
"sst": "file:../../sdk/js"
}
}


File: platform/package.json

{
"$schema": "https://json.schemastore.org/package.json",
"name": "@sst/platform",
"type": "module",
"prettier": {},
"scripts": {
"test": "vitest run",
"dev": "tsc --watch --noEmit",
"build": "bash ./scripts/build"
},
"sideEffects": false,
"trustedDependencies": [
"esbuild",
"protobufjs"
],
"dependencies": {
"@aws-sdk/client-cloudfront": "3.478.0",
"@aws-sdk/client-cloudwatch-logs": "3.478.0",
"@aws-sdk/client-ecr": "3.478.0",
"@aws-sdk/client-lambda": "3.478.0",
"@aws-sdk/client-rds-data": "3.478.0",
"@aws-sdk/client-route-53": "3.478.0",
"@aws-sdk/client-s3": "3.478.0",
"@aws-sdk/client-ssm": "3.478.0",
"@aws-sdk/client-sts": "3.478.0",
"@aws-sdk/middleware-retry": "3.374.0",
"@pulumi/aws": "7.20.0",
"@pulumi/cloudflare": "6.15.0",
"@pulumi/command": "1.0.1",
"@pulumi/docker-build": "0.0.14",
"@pulumi/pulumi": "3.215.0",
"@pulumi/random": "4.16.6",
"@pulumi/tls": "5.0.1",
"@pulumiverse/vercel": "4.6.0",
"@smithy/smithy-client": "2.1.18",
"@tsconfig/node18": "18.2.2",
"@types/node": "^22.10.0",
"acorn": "8.11.3",
"acorn-walk": "8.3.2",
"archiver": "6.0.1",
"aws4fetch": "1.0.18",
"esbuild": "0.21.5",
"glob": "10.3.10",
"prettier": "3.1.1",
"ts-node": "^10.9.2",
"typescript": "5.7.2",
"undici": "^6.19.5",
"unenv": "2.0.0-rc.24",
"@cloudflare/unenv-preset": "2.16.0"
},
"devDependencies": {
"@aws-sdk/client-iot": "3.501.0",
"@types/archiver": "6.0.2",
"@types/aws-lambda": "8.10.133",
"@types/bun": "1.2.1",
"vitest": "^1.2.2"
},
"overrides": {
"string-width": "4.2.3",
"google-protobuf": "3.21.2"
}
}


File: platform/tsconfig.json

{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "@tsconfig/node18/tsconfig.json",
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "Bundler",
"isolatedModules": true,
"downlevelIteration": true
},
"exclude": ["templates", "functions"]
}


File: platform/templates/analog/preset.json

{
"steps": [
{
"type": "copy"
},
{
"type": "patch",
"properties": {
"file": "package.json",
"patch": [
{
"op": "add",
"path": "/overrides/nitropack",
"value": "npm:nitropack-nightly@latest"
}
]
}
},
{
"type": "npm",
"properties": {
"file": "package.json",
"package": "sst"
}
},
{
"type": "instructions",
"properties": [
"Next steps: update plugins in vite.config.ts",
"",
"export default defineConfig({",
" plugins: [",
" analog({",
" nitro: {",
" preset: "aws-lambda",",
" }",
" })",
" ],",
"});"
]
}
]
}


File: platform/templates/angular/preset.json

{
"steps": [
{
"type": "copy"
},
{
"type": "npm",
"properties": {
"file": "package.json",
"package": "sst"
}
}
]
}


File: platform/templates/astro/preset.json

{
"steps": [
{
"type": "copy"
},
{
"type": "patch",
"properties": {
"file": "tsconfig.json",
"patch": [
{
"op": "add",
"path": "/exclude/-",
"value": "sst.config.ts"
}
]
}
},
{
"type": "npm",
"properties": {
"file": "package.json",
"package": "sst"
}
},
{
"type": "npm",
"properties": {
"file": "package.json",
"package": "astro-sst"
}
},
{
"type": "instructions",
"properties": [
"Next steps: update astro.config.mjs",
"",
"import aws from "astro-sst";",
"export default defineConfig({",
" output: "server",",
" adapter: aws()",
"});"
]
}
]
}


File: platform/templates/js-aws/preset.json

{
"steps": [
{
"type": "copy"
},
{
"type": "npm",
"properties": {
"file": "package.json",
"package": "sst"
}
},
{
"type": "npm",
"properties": {
"file": "package.json",
"package": "@types/aws-lambda",
"dev": true
}
}
]
}


File: platform/templates/js-aws/files/tsconfig.json

{}


File: platform/templates/js-cloudflare/preset.json

{
"steps": [
{
"type": "copy"
},
{
"type": "npm",
"properties": {
"file": "package.json",
"package": "sst"
}
},
{
"type": "npm",
"properties": {
"file": "package.json",
"package": "@cloudflare/workers-types",
"dev": true
}
}
]
}


File: platform/templates/js-cloudflare/files/tsconfig.json

{
"compilerOptions": {
"lib": ["esnext"],
"types": ["@cloudflare/workers-types"]
}
}


File: platform/templates/nextjs/preset.json

{
"steps": [
{
"type": "copy"
},
{
"type": "patch",
"properties": {
"file": "tsconfig.json",
"patch": [
{
"op": "add",
"path": "/exclude/-",
"value": "sst.config.ts"
}
]
}
},
{
"type": "npm",
"properties": {
"file": "package.json",
"package": "sst"
}
},
{
"type": "gitignore",
"properties": {
"name": "# open-next",
"path": ".open-next"
}
}
]
}


File: platform/templates/nuxt/preset.json

{
"steps": [
{
"type": "copy"
},
{
"type": "patch",
"properties": {
"file": "package.json",
"patch": [
{
"op": "add",
"path": "/overrides/nitropack",
"value": "npm:nitropack-nightly@latest"
}
]
}
},
{
"type": "npm",
"properties": {
"file": "package.json",
"package": "sst"
}
},
{
"type": "instructions",
"properties": [
"Next steps: update nuxt.config.ts",
"",
"export default defineNuxtConfig({",
" nitro: {",
" preset: "aws-lambda",",
" },",
"});"
]
}
]
}


File: platform/templates/react-router/preset.json

{
"steps": [
{
"type": "copy"
},
{
"type": "patch",
"properties": {
"file": "tsconfig.json",
"patch": [
{
"op": "add",
"path": "/exclude/-",
"value": "sst.config.ts"
}
]
}
},
{
"type": "npm",
"properties": {
"file": "package.json",
"package": "sst"
}
}
]
}


File: platform/templates/remix/preset.json

{
"steps": [
{
"type": "copy"
},
{
"type": "npm",
"properties": {
"file": "package.json",
"package": "sst"
}
}
]
}


File: platform/templates/solid-start/preset.json

{
"steps": [
{
"type": "copy"
},
{
"type": "patch",
"properties": {
"file": "package.json",
"patch": [
{
"op": "add",
"path": "/overrides/nitropack",
"value": "npm:nitropack-nightly@latest"
}
]
}
},
{
"type": "npm",
"properties": {
"file": "package.json",
"package": "sst"
}
},
{
"type": "instructions",
"properties": [
"Next steps: update app.config.ts",
"",
"export default defineConfig({",
" server: {",
" preset: "aws-lambda",",
" awsLambda: {",
" streaming: true,",
" },",
" },",
"});"
]
}
]
}


File: platform/templates/svelte-kit/preset.json

{
"steps": [
{
"type": "copy"
},
{
"type": "npm",
"properties": {
"file": "package.json",
"package": "sst"
}
},
{
"type": "npm",
"properties": {
"file": "package.json",
"package": "svelte-kit-sst"
}
},
{
"type": "instructions",
"properties": [
"Next steps: update svelte.config.js",
"",
"import adapter from "svelte-kit-sst";"
]
}
]
}


File: platform/templates/tanstack-start/preset.json

{
"steps": [
{
"type": "copy"
},
{
"type": "npm",
"properties": {
"file": "package.json",
"package": "sst"
}
},
{
"type": "instructions",
"properties": [
"Next steps: update app.config.ts",
"",
"export default defineConfig({",
" server: {",
" preset: 'aws-lambda',",
" awsLambda: {",
" streaming: true,",
" },",
" },",
"});"
]
}
]
}


File: platform/templates/vanilla/preset.json

{
"steps": [
{
"type": "copy"
}
]
}


File: sdk/js/package.json

{
"$schema": "https://json.schemastore.org/package.json",
"name": "sst",
"type": "module",
"sideEffects": false,
"version": "0.0.0",
"main": "./dist/index.js",
"repository": {
"type": "git",
"url": "git+https://github.com/anomalyco/sst.git"
},
"license": "MIT",
"exports": {
".": "./dist/index.js",
"./resource": {
"types": "./dist/resource/index.d.ts",
"workerd": "./dist/resource/cloudflare.js",
"worker": "./dist/resource/cloudflare.js",
"default": "./dist/resource/node.js"
},
"./resource/cloudflare": {
"types": "./dist/resource/cloudflare.d.ts",
"default": "./dist/resource/cloudflare.js"
},
"./auth": "./dist/auth/index.js",
"./auth/adapter": "./dist/auth/adapter/index.js",
"./event": "./dist/event/index.js",
"./realtime": "./dist/realtime/index.js",
"./": {
"import": "./dist/
.js",
"types": "./dist/*.d.ts"
}
},
"scripts": {
"build": "tsc",
"dev": "tsc -w",
"release": "./scripts/release.ts"
},
"devDependencies": {
"@aws/durable-execution-sdk-js-testing": "^1.1.1",
"@tsconfig/node20": "20.1.4",
"@types/aws-lambda": "^8.10.155",
"@types/node": "22.10.0",
"bun-types": "1.3.0",
"hono": "4.3.9",
"typescript": "5.7.2",
"valibot": "^1.0.0-rc.3",
"zod": "^3.24.2"
},
"files": [
"dist",
"bin"
],
"bin": {
"sst": "./bin/sst.mjs"
},
"optionalDependencies": {},
"dependencies": {
"@aws/durable-execution-sdk-js": "1.0.2",
"aws4fetch": "1.0.18",
"jose": "5.2.3",
"openid-client": "5.6.4"
}
}


File: sdk/js/tsconfig.json

{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "@tsconfig/node20/tsconfig.json",
"compilerOptions": {
"resolveJsonModule": true,
"preserveSymlinks": true,
"outDir": "dist",
"declaration": true,
"module": "NodeNext",
"moduleResolution": "NodeNext",
"isolatedModules": true,
"downlevelIteration": true,
"lib": ["ES2022", "DOM"],
"types": ["@types/node"]
},
"exclude": ["scripts", "dist", "test"]
}


File: sdk/python/README.md

SST Python SDK

The Python SDK for SST lets you access linked resources in your Python Lambda functions.

Installation

bash
pip install sst-sdk

Or with uv:

bash
uv add sst-sdk

Migrating from the Git dependency

If you were previously installing the SDK from GitHub:

toml
# Before
[project]
dependencies = ["sst"]

[tool.uv.sources]
sst = { git = "https://github.com/anomalyco/sst", subdirectory = "sdk/python" }

Update your pyproject.toml to use the PyPI package instead:

toml
# After
[project]
dependencies = ["sst-sdk"]

That's it — remove the [tool.uv.sources] entry for sst and replace the dependency name. No code changes needed; from sst import Resource works the same way.

Usage

Use Resource to access any resource linked to your function in sst.config.ts:

python
from sst import Resource

# Access linked resources by name
bucket_name = Resource.MyBucket.name
table_name = Resource.MyTable.name

Resources are defined and linked in your sst.config.ts:

ts
const bucket = new sst.aws.Bucket("MyBucket");

new sst.aws.Function("MyFunction", {
  handler: "handler.main",
  link: [bucket],
});

The SDK reads resource bindings from encrypted environment variables set by SST at deploy time. In sst dev, resources are available automatically through the local development bridge.

Supported Python Versions

  • Python 3.9+

File: www/README.md

Docs

Repo for sst.dev

Built with Astro Starlight and SST v3. Auto-deployed with the SST Console.


File: www/package.json

{
"name": "www",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "bun generate && astro build",
"preview": "astro preview",
"astro": "astro",
"generate": "bun generate-cli-json && bun ./generate.ts",
"generate-changelog": "bun ./generate.ts changelog",
"generate-components": "bun ./generate.ts components",
"generate-examples": "bun ./generate.ts examples",
"generate-cli": "bun generate-cli-json && bun ./generate.ts cli",
"generate-cli-json": "go run ../cmd/sst introspect > cli-doc.json"
},
"dependencies": {
"@astro-community/astro-embed-youtube": "^0.5.3",
"@astrojs/check": "^0.9.2",
"@astrojs/markdown-remark": "^5.3.0",
"@astrojs/sitemap": "^3.1.6",
"@astrojs/starlight": "^0.34.1",
"@fontsource-variable/roboto-mono": "^5.0.17",
"@fontsource-variable/rubik": "^5.0.20",
"@fontsource/ibm-plex-mono": "^5.0.8",
"astro": "^5.7.0",
"astro-expressive-code": "^0.41.2",
"astro-sst": "^3.1.3",
"js-base64": "^3.7.6",
"rehype-autolink-headings": "^7.1.0",
"sharp": "^0.33.3",
"sst": "3.13.20"
},
"devDependencies": {
"@types/node": "^20.10.5",
"typedoc": "0.25.7",
"typescript": "5.3.3"
}
}


File: www/tsconfig.json

{
"extends": "astro/tsconfigs/strict"
}


File: www/src/content/docs/404.mdx


title: '404' template: splash pagefind: false hero: title: '404' tagline: Page not found. Check the URL and try again.


File: www/src/content/docs/about.mdx


title: About template: splash pagefind: false hero: title: "n/a"

import About from "../../components/About.astro";


File: www/src/content/docs/index.mdx


title: SST template: splash pagefind: false hero: title: "n/a"


File: www/src/content/docs/blog/announcing-sst-1-0-conf.mdx


title: Announcing SST 1.0 Conf author: jay template: splash image: /social-cards/blog/sst-1-0-conf.png lastUpdated: 2022-05-05 pagefind: false

You might’ve heard about our v1 release. As SST enters into a new phase, we wanted to do something special for our community. We are putting together a virtual community event to commemorate the launch!

SST 1.0 Conf is a free virtual event happening on May 17th, 2022 at 9am PDT. Register for the conference now.

It’ll feature talks from the SST community about how they are using SST and serverless in their projects. Including folks from Comcast, The LEGO Group, Analog Devices, and Shell. We’ll also have a couple of live demos and workshops from the SST team.

We know you are all very busy and we don’t want to take up your entire day. So we decided to make the talks really short, around 10 minutes each. We hope you’ll be able to join us.

While most of the schedule has been finalized, we are looking for a couple more speakers. If you’d like to share something with the community, fill out this short form and we’ll get in touch with you!

We want to use this event as a way to bring our community together. To share what we’ve all learnt over the last year of using SST.

Next Steps

  • Head over to the SST 1.0 Conf site and register.
  • Join the SST Slack (if you haven’t done so already).
  • Share on Twitter or LinkedIn that you’ll be joining SST 1.0 Conf.

Psst! Check out the domain the conference website is hosted on. It might be a sign of things to come!


File: www/src/content/docs/blog/aurora-serverless-in-v3.mdx


template: splash title: Aurora Serverless in v3 author: jay lastUpdated: 2025-01-05 pagefind: false

import { Image } from 'astro:assets';
import { YouTube } from '@astro-community/astro-embed-youtube';

We are adding Aurora, a new component for Amazon Aurora Serverless v2. Recently, AWS announced that Aurora Serverless v2 can scale to 0 and auto-pause. This is good for dev or PR stages.

There are some differences between this and the Postgres RDS component. We talk about it here in this video.


Getting started

To get started, you can add the Aurora component to your app.

ts title="sst.config.ts"
const vpc = new sst.aws.Vpc("MyVpc");

const database = new sst.aws.Aurora("MyDatabase", {
  engine: "postgres",
  vpc
});

Read more about the Aurora component.


Scaling

By default, this has a min of 0 ACUs and a max of 4 ACUs.

An ACU or Aurora Capacity Unit is roughly equivalent to 2 GB of memory. So pick the minimum and maximum based on the baseline and peak memory usage of your app.

ts title="sst.config.ts" {3-6}
new sst.aws.Aurora("MyDatabase", {
  engine: "postgres",
  scaling: {
    min: "2 ACU",
    max: "128 ACU"
  },
  vpc
});

If you set a min of 0 ACUs, the database will be paused when there are no active connections in the pauseAfter specified time period.

Read more about the scaling config.


Dev mode

Aside from scaling to 0, you can also configure the Aurora component to not deploy the database in sst dev. Instead it can link to your locally running database, if you enable the dev prop.

ts title="sst.config.ts" {3-9}
new sst.aws.Aurora("MyDatabase", {
  engine: "postgres",
  dev: {
    username: "postgres",
    password: "password",
    database: "local",
    host: "localhost",
    port: 5432
  },
  vpc
});

Read more about the dev config.


Cost

Each ACU costs $0.12 per hour for both postgres and mysql engine. The storage costs $0.01 per GB per month for standard storage.

So if your database is constantly using 1GB of memory or 0.5 ACUs, then you are charged $0.12 x 0.5 x 24 x 30 or $43 per month. And add the storage costs to this as well.

If your database scales to 0 ACUs and is auto-paused, you are not charged for the ACUs.

Read more about the cost of using Aurora.


Examples

We also have a few examples that you can check out.


File: www/src/content/docs/blog/auth.mdx


template: splash title: Auth author: jay pagefind: false image: /social-cards/blog/sst-auth.png lastUpdated: 2022-09-01

import { YouTube } from '@astro-community/astro-embed-youtube';

Today we are launching Auth — a modern lightweight authentication library for your SST apps.

With a simple set of configuration, it'll create a function that'll handle various authentication flows. You can then attach this function to your API and SST will help you manage the session tokens.

Auth is completely stateless, standards based, and free to use.

You can read more about it over on our docs.

Overview

Auth is made up of the following pieces:

  1. Auth — a construct that creates the necessary infrastructure.

    • The API routes to handle the authentication flows.
    • Securely generates a RSA public/private keypair to sign sessions.
    • Stores the RSA keypair as secrets in the app's Config.
  2. AuthHandler — a Lambda handler function that can handle authentication flows for various providers.

    • High level adapters for common providers like Google, GitHub, Twitch, etc.
    • OIDC and OAuth adapters that work with any compatible service.
    • A LinkAdapter to generate login links that can be sent over email or SMS.
    • Can be extended with custom adapters to support more complex workflows, like multi-tenant SSO.
  3. Session — a library for issuing and validating authentication sessions in your Lambda function code.

    • Implemented with stateless JWT tokens that are signed with the RSA keypairs mentioned above.
    • Support for passing tokens to the frontend via a cookie or the query string.
    • Full typesafety for issuing and validating sessions with the useSession hook.

Launch event

We hosted a launch livestream on YouTube where we did a demo and a deep dive into the internals.

The video is timestamped and here's roughly what we covered.

  1. Intro
  2. What is Auth?
  3. Setting up the construct
  4. Configuring the AuthHandler function
  5. Magic link adapter
  6. Issuing a session
  7. Validating a session
  8. Behind the scenes
  9. Outro

Get started

Follow the Setup section in our docs to get started.


File: www/src/content/docs/blog/buildforce-is-creating-the-first-ever-career-platform-for-the-construction-trade-with-sst.mdx


title: Buildforce & SST pagefind: false author: jay template: splash image: /social-cards/blog/case-study-buildforce.png lastUpdated: 2021-10-28

We are talking to Michael Orcutt, a co-founder of Buildforce about their experience building with SST and Seed.

About Buildforce

Buildforce is building the first ever career platform for people in the construction trades, starting with those in the electrical trade. Its end-to-end platform enables people in the construction trades to maintain consistent work at fair pay and with employee benefits with our construction partners, an arrangement that is out of reach for many in the construction industry today.

Since their launch in 2020, Buildforce has become the go-to partner helping dozens of the largest contractors across its focus geographies connect with this workforce.

Buildforce currently operates in the state of Texas, has raised $5.5M to date, and is growing 10% week over week in 2021. Michael Orcutt is one of the founders of the company and is leading the engineering efforts. He is also highly involved in product and design as they build their web apps, mobile apps, and marketing site.

The Challenge

The Buildforce team knew they wanted to build their applications using serverless due to the inherent benefits. They originally started out with Serverless Framework. But over time Serverless Framework became a headache. Everything from the deployment process to testing was cumbersome. "We felt we were slow, velocity was down as the speed of development wasn't great", says Michael. "We also found creating infrastructure in YAML challenging". They realized this just wouldn't work as they scaled the team.

Enter SST

Around 2 months ago the team came together and decided they needed to make a change. They had heard about SST and the SST Guide. They decided they needed to take a deeper look.

As they tried out SST, "We were blown away by the local development environment", says Michael. The entire team decided to move to SST.

"We were blown away by the local development environment."

They decided to start a new SST app from scratch. They spent some time testing SST and within a month they had moved over completely. The new setup Michael says is "Such a great experience. We are at least 1.5 to 2 times faster than before".

"We are at least 1.5 to 2 times faster than before."

They also use Seed for their deployment workflow. They typically branch from main, work locally, push to a feature branch. The feature branches get deployed through Seed and connects to dev resources. Finally they rebase with master and that deploys to production. The dev and prod environments are on separate AWS accounts.

Looking Ahead

Michael says they really need to grow the team. As more and more electricians are onboarded, they need to make sure every construction worker has a great experience and our operations team has the right tools to manage our workforce.

From an architecture perspective, their single web application will most likely be split into multiple SST apps; one for their electricians, one for the contractors, and one for the ops team. They will also be introducing ElasticSearch for better search functionality.

Thanks to SST their entire development setup works seamlessly, allowing them to focus on the needs of a fast growing business.

Learn More

Learn more about the job opportunities at Buildforce.


Read more about SST and get started today.


File: www/src/content/docs/blog/config.mdx


title: Config author: jay image: /social-cards/blog/sst-config.png template: splash pagefind: false lastUpdated: 2022-08-22

import { YouTube } from '@astro-community/astro-embed-youtube';

We are launching a set of tools to securely manage secrets and environment variables in your SST apps, called Config.

You can read more about it in detail over on our docs. The Config libraries include:

  1. Constructs to define them
    1. Config.Secret
    2. Config.Parameter
  2. CLI to set secrets sst secrets [action]
  3. Lambda helpers to fetch them @serverless-stack/node/config
    • Throws an error if they are not defined
    • Fetches them automatically at runtime
    • Provides typesafety and autocomplete

Behind the scenes, Secrets and Parameters are stored as AWS SSM Parameters in your AWS account. They are stored with the Standard Parameter type and Standard Throughput.

This makes Config free to use in your SST apps.

Launch event

We hosted a launch livestream on YouTube where we did a deep dive of the Config and its internals.

The video is timestamped and here's roughly what we covered.

  1. Intro
  2. Demo
  3. Deep Dive
    1. Deep dive into the Parameters code
    2. Parameter vs Lambda environment variables
    3. Deep dive into the Secrets code
    4. IAM permission for fetching secrets
    5. CLI command sst secrets
    6. Secrets fallback
  4. Q&A
    1. Q: What is the AWS cost of using Config?
    2. Q: What does the SSM path look like?
    3. Q: Managing secrets in my CI pipeline
    4. Q: Managing secrets across AWS accounts
    5. Q: Accessing Config inside or outside the handler
    6. Q: Would changing a secret require redeployment?
    7. Q: Using Config for tests
    8. Q: SSM vs Secret Manager
    9. Q: Export secrets to a .env file
    10. Q: Reference Config across multiple SST apps

Get started

To get started, define a secret in your stacks.

typescript
import { Config, StackContext } from "@serverless-stack/resources";

export default function SecretsStack({ stack }: StackContext) {
  const STRIPE_KEY = new Config.Secret(stack, "STRIPE_KEY");

  return { STRIPE_KEY };
}

Use the config option to pass the secret into the function.

typescript
import { use, Function, StackContext } as sst from "@serverless-stack/resources";
import SecretsStack from "./SecretsStack";

export default function MyStack({ stack }: StackContext) {
  const { STRIPE_KEY } = use(SecretsStack);

  new Function(stack, "MyFunction", {
    handler: "lambda.handler",
    config: [STRIPE_KEY],
  }
};

In your terminal, run the sst secrets command to set a value for the secret:

bash
$ npx sst secrets set STRIPE_KEY sk_test_abc123

Finally in your function code, use the @serverless-stack/node/config library to reference the secret value:

typescript
import { Config } from "@serverless-stack/node/config";

export const handler = async () => {
  console.log(Config.STRIPE_KEY);

  // ...
};

To learn more check out our docs.


File: www/src/content/docs/blog/configure-autodeploy-workflow.mdx


template: splash title: Configure Autodeploy workflow author: jay pagefind: false lastUpdated: 2025-01-30

You can now completely control the build process when auto-deploying your app through the Console.

Background

After you've enabled Autodeploy, the Console will start a build process, check out your code, detect your package manager, install dependencies, and run sst deploy; all without needing a config.

However, there are times where you want to configure the build process. For example, to run your tests, or run some post-deploy script.

You can now do that with the new autodeploy.workflow prop.


Workflow

The autodeploy.workflow prop allows you to completely take over control of the build process and run any commands you want.

ts title="sst.config.ts" {6-11}
export default $config({
  app(input) { /* ... */ },
  async run() { /* ... */ },
  console: {
    autodeploy: {
      async workflow({ $, event }) {
        await $`npm i`;
        event.action === "removed"
          ? await $`npm sst remove`
          : await $`npm sst deploy`;
      }
    }
  }
});

The problem with CI/CD scripts has always been that they are bash commands embedded in a YAML config. This can be hard to write and maintain.

Even though the SST config is in TypeScript, it's still cumbersome to write shell scripts in Node.


Bun Shell

To address this we run the workflow function in a Bun process. $ is the Bun Shell, a bash-like shell that makes it easy to write scripts in TypeScript and JavaScript.

ts title="sst.config.ts"
async workflow({ $, event }) {
  await $`npm i -g pnpm`;
  await $`pnpm i`;

  const { exitCode } = await $`pnpm test`.nothrow();
  if (exitCode !== 0) {
    // Process the test report and then fail the build
    throw new Error("Failed to run tests");
  }

  event.action === "removed"
    ? await $`pnpm sst remove`
    : await $`pnpm sst deploy`;
}

This simplifies the shell commands in your deployment scripts.


Errors

In the above example, we are throwing an error after we handle a failed command.

ts
throw new Error("Failed to run tests");

This will fail the build and display this error message in the Console.


Learn more

You can see the new workflow prop in action in how the Console is deployed; since the Console auto-deploys itself!

ts title="sst.config.ts"
async workflow({ $, event }) {
  await $`bun i`;
  await $`goenv install 1.21.3 && goenv global 1.21.3`;
  await $`cd ../platform && ./scripts/build`;
  await $`bun i sst-linux-x64`;
  event.action === "removed"
    ? await $`bun sst remove`
    : await $`bun sst deploy`;
}

Learn more about the new workflow prop in the docs.


Other updates

We also rolled out a couple of other updates to Autodeploy:

  • We implemented a workaround so you won't get the annoying Docker Hub rate limit errors while deploying the Service component.
  • You can now return multiple stages in autodeploy.target. This means that when you git push to your repo, the Console can deploy to multiple stages.

You can learn more about the Console and Autodeploy in the docs.


File: www/src/content/docs/blog/console-container-updates.mdx


template: splash title: Console container updates author: jay lastUpdated: 2024-11-25 pagefind: false

We are rolling out some updates to the Console to better support container applications.

Logs

You can now see logs from your containers in the Console. In addition to the logs from your functions. Head over to your App > Stage > Logs.

As a bonus, you can see logs from any CloudWatch log group that your app creates.

Autodeploy

The Console can auto-deploy your apps when you git push to your GitHub repo. We added the following updates recently.

  • VPC: You can now configure Autodeploy to run in your VPC using autodeploy.runner.vpc. This is useful if your builds need to access private resources.
  • Caching: You can now configure files or directories to be cached as a part of your build process with autodeploy.runner.cache. This can help speed up builds.
  • Extended timeouts: Autodeploys now have a maximum timeout of 36 hours. This is useful for apps that take a long time to build.
  • New runner sizes: There are new xlarge and 2xlarge sizes with around 70GB and 145GB of memory; helpful for large applications.

Check out the updated console.autodeploy config.

Other updates

While not strictly related to containers we also added support for:

  • Manual deploys: You can now manually trigger a deployment from App > Autodeploy > hitting the Deploy button. You can pass in a Git ref and the stage you want to deploy to.
  • Redeploys: You can now redeploy any past deploy through the Console.
  • Cancel deploys: You can also cancel a deploy that's in progress through the Console.

About Autodeploy

If you haven't used Autodeploy before, we designed it to be a better fit for SST apps when compared to alternatives like GitHub Actions or CircleCI.

  1. Easy to get started, supports branch and PR workflow out of the box.
  2. Configurable, customize your workflow through your sst.config.ts.
  3. Runs in your AWS account, builds are run in your AWS account and can use your VPC.

And it integrates with the rest of the SST Console. Learn more about Autodeploy to get started.


File: www/src/content/docs/blog/console-pricing-update.mdx


template: splash title: Console pricing update author: jay lastUpdated: 2025-01-23 pagefind: false

:::note[Update]
Feb 10, 2025: We added a way to handle PR and other epehemeral stages. See FAQ.
:::

Starting Feb 1, we'll be rolling out a new pricing model for the Console. Currently the pricing is based on the number of times the Lambda functions in your apps are invoked. Moving forward, it'll be based on the number of active resources in your apps.


Why the change?

When SST was first released, there was a big focus on serverless and Lambda functions. The Issues feature was also the focal point of the Console. So it made sense to tie the pricing to the number of Lambda function invocations in your apps.

Over the last few months, we added the ability to Autodeploy your apps. And added broader support for container services. So a Lambda specific metric doesn't really make sense anymore.

We think the number of active resources will be more representative of your usage.


How does it work?

At the start of every month, or billing cycle, the Console will keep track of the stages that are updated across your workspace, add up the resources in those stages, and apply the following rate.

Resources Rate per resource
First 2000 $0.086
2000+ $0.032

Free Tier: Workspaces with 350 active resources or fewer.


Examples

So for example, if you have the following number of active resources in your workspace:

Resources Cost per month
350 You are in the free tier, so you'll be charged $0.
500 You are above the free tier, so you'll be charged $0.086 x 500 = $43.
2500 You are in a higher tier, so $0.086 x 2000 + $0.032 x (2500 - 2000) = $188.

The count of the active resources in your workspace resets at the start of every billing cycle.


FAQ

  1. Do I need to use the Console to use SST?

    You don't need the Console to use SST. It compliments the CLI and has some features that help with managing your apps in production.

    That said, it is completely free to get started. You can create an account and invite your team, without having to add a credit card.

  2. I'm still trying out the Console. Can I continue using it?

    You can continue using the Console as a part of the free tier. If you go over the free tier, you won't be able to access the production or deployed stages.

    However, you can continue to access your personal stages. Just make sure you have sst dev running locally. Otherwise the Console won't be able to detect that it's a personal stage.

  3. What is an active resource?

    Resources are what SST creates in your cloud provider. This includes the resources created by both SST's built-in components, like Function, Nextjs, Bucket, and the ones created by any other Terraform/Pulumi provider.

    Some components, like Nextjs and StaticSite, create multiple resources. In general, the more complex the component, the more resources it'll create.

    You can see a full list of resources if you go to an app in your Console and navigate to a stage in it.

    For some context, the Console is itself a pretty large SST app and it has around 320 resources.

    A resource is considered active if the stage it belongs to has been updated during the billing cycle. However, if the only update to a stage was to remove it, the resources in that stage will not be counted as active.

  4. What about PR stages?

    A stage has to be around for at least 2 weeks before the resources in it are counted as active. So if a PR stage is created and removed within 2 weeks, they don't count.

    However, if you remove a stage and create a new one with the same name, it does not reset the 2 week initial period.

  5. Does this apply to SST v2 and v3 apps?

    Yes, it applies to any kind of SST app.

  6. What if I'm on the old plan?

    If you are on the old plan, you don't have to switch and you won't be automatically switched over either.

    You can go to the workspace settings and check out how much you'll be billed based on both the plans. To switch over, you can cancel your current plan and then subscribe to the new plan.

    At some point in the future, we'll remove the old plan. But there's no specific timeline for it yet.

  7. Are there any volume pricing options?

    Yes you can contact us and we can figure out a pricing plan that works for you.

Learn more about the new pricing in our docs.


If you've got any questions about the new pricing, or about the Console in general, feel free to get in touch.