sst
БесплатноБез исполняемых скриптовНе проверенBuilds and deploys full-stack applications on AWS with SST (v3 and later, built on Pulumi), defining Lambda functions, API Gateway routes, DynamoDB tables, S3…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
SST
Overview
SST is a framework for building full-stack apps on your own AWS account. Infrastructure is declared in a TypeScript sst.config.ts using components such as sst.aws.Function, sst.aws.ApiGatewayV2, sst.aws.Dynamo, sst.aws.Bucket and sst.aws.Nextjs. A link property gives a function or site IAM permissions and typed access to a resource through the Resource object. sst dev runs your functions live against real AWS.
This skill covers SST v3 and later (npm sst 4.x at the time of writing). The old v2 "Serverless Stack" constructs (Api, Table, Stack, packages/core templates) do not exist any more; the v2 to v3 migration guide is at https://sst.dev/docs/migrate-from-v2.
Instructions
- Install and initialise. In a JS project run
npm install sst, thennpx sst init. In a Next.js, Remix, Astro or SvelteKit project it detects the framework and adds SST in drop-in mode. Add--yesto skip the confirmation. - Write
sst.config.ts. It hasapp()(name,home: "aws",removal,protect) andrun()(the resources). Do not import provider packages in this file; the globalssst,$appand$devare available. - Link resources.
link: [table]on a Function or frontend injects the resource and grants IAM permission. Read it in code withimport { Resource } from "sst"andResource.Notes.name. On frontends the links exist only on the server side. - Develop.
npx sst devdeploys your resources, runs functions live on your machine and starts the frontend dev server in its own tab. TheNextjs,RemixandAstrosites are not deployed bysst dev.sst dev --mode=basicgives the old single-process behaviour (it only deploys the app and runs functions); start the frontend in a second terminal by wrapping its command, for examplesst dev next dev, so it loads the linked resources. - Preview changes.
sst diff --stage productionlists what a deploy would create, change or delete. - Deploy.
sst deploy --stage production. Without--stage, the personal stage (your username, stored in.sst/stage) is used. If you pass a stage in CI, use--stageorSST_STAGE. - Secrets. Declare
new sst.Secret("StripeKey")(name starts with a capital letter, letters and digits only), link it, thensst secret set StripeKey sk_live_51Nx --stage production. Withoutsst devrunning, redeploy to apply it.sst secret set Name value --fallbacksets a value used by every stage that has none, which suits PR stages. - Remove.
sst remove --stage pr-42deletes a stage. What is actually deleted depends onremovalin the app config.
Examples
Example 1: Notes API on API Gateway with DynamoDB
The user says: "Create a REST API on AWS with a DynamoDB table using SST."
/// <reference path="./.sst/platform/config.d.ts" />
export default $config({
app(input) {
return {
name: "notes-api",
home: "aws",
removal: input.stage === "production" ? "retain" : "remove",
protect: input.stage === "production",
};
},
async run() {
const table = new sst.aws.Dynamo("Notes", {
fields: { userId: "string", noteId: "string" },
primaryIndex: { hashKey: "userId", rangeKey: "noteId" },
});
const api = new sst.aws.ApiGatewayV2("NotesApi");
api.route("GET /notes/{userId}", { handler: "src/list.handler", link: [table] });
api.route("POST /notes", { handler: "src/create.handler", link: [table] });
return { url: api.url };
},
});
// src/list.ts
import { Resource } from "sst";
import { DynamoDBClient } from "@aws-sdk/client-dynamodb";
import { DynamoDBDocumentClient, QueryCommand } from "@aws-sdk/lib-dynamodb";
const db = DynamoDBDocumentClient.from(new DynamoDBClient({}));
export async function handler(event: { pathParameters: { userId: string } }) {
const out = await db.send(new QueryCommand({
TableName: Resource.Notes.name,
KeyConditionExpression: "userId = :u",
ExpressionAttributeValues: { ":u": event.pathParameters.userId },
}));
return { statusCode: 200, body: JSON.stringify(out.Items) };
}
Install the SDK packages with npm install @aws-sdk/client-dynamodb @aws-sdk/lib-dynamodb. npx sst dev prints the API URL under url; each request runs your handler locally with the real table.
Example 2: Next.js with a preview environment per pull request
The user says: "Deploy my Next.js app on AWS, and give every PR its own environment."
async run() {
const uploads = new sst.aws.Bucket("Uploads");
const web = new sst.aws.Nextjs("Web", { link: [uploads] });
return { url: web.url };
}
$ npx sst deploy --stage pr-42
$ npx sst remove --stage pr-42
A CI job runs the first command when the PR opens or updates and the second when it closes. Set removal: "remove" for non-production stages (as in Example 1); with the default "retain", S3 buckets and DynamoDB tables of a removed PR sta
Установить sst в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл sst?
Builds and deploys full-stack applications on AWS with SST (v3 and later, built on Pulumi), defining Lambda functions, API Gateway routes, DynamoDB tables, S3 buckets and Next.js, Remix or Astro sites in sst.config.ts. Use when the user wants to deploy a serverless app to AWS, run sst dev, link resources into functions, manage secrets, or set up per-PR preview stages. Trigger words: sst, serverless stack, sst dev, sst deploy, aws lambda, sst ion, resource linking.
Как установить скилл sst?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sst запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic