published fresh until

AWS serverless setup: SST, Serverless Framework or SAM?

Summary When choosing a serverless setup for a first Lambda HTTP API, use SAM for local Docker testing, SST for TypeScript infrastructure with live cloud development, or Serverless Framework for an existing plugin workflow; this one-route tutorial chooses SAM.

Not for AWS Lambda-to-RDS network timeouts, see aws-lambda-rds-vpc-task-timed-out-network-path

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Start with SAM for one Lambda HTTP endpoint; choose SST for linked TypeScript infrastructure or Serverless Framework for an established service/plugin workflow.

Do first: check the SAM CLI with sam --version

Install the AWS CLI, Docker and the stable SAM CLI through AWS's installer instructions. Configure a development AWS profile and region before any deployment. Run:

sam --version
sam init

Choose an AWS quick-start Hello World application, a supported runtime and Zip packaging. Enter the generated project directory, then:

sam build
sam local start-api

Open the printed /hello URL and check the generated handler's response. Docker runs the function for local HTTP testing. After source changes, rebuild if you are using built artifacts. See SAM initialization and local API testing.

When ready to create billable cloud resources, use sam deploy --guided, select the development profile/region, and review the proposed resources and IAM permissions. Test the deployed endpoint separately: local execution does not prove IAM or cloud integrations. Use sam delete to remove that disposable stack after the trial; review retained data before cleanup.

Options and cost boundaries, as of November 2026 (checked 2026-11-24)

Option / stable releaseFor / winsLoses whenCost and limitsPick this if
SAM CLI 1.174.0AWS template workflow and Docker-based function testingYou want a single TypeScript model for app and infrastructureOpen-source CLI; deployed AWS services are a separate bill. Local API testing is not a complete AWS emulatorYou want an AWS-owned template and deployment workflow
SST 4.17.2TypeScript components, resource linking and live function developmentYou require a wholly offline development loopCLI is free; Console is optional SaaS. Dev mode deploys resources in your AWS accountYou want TypeScript infrastructure and accept cloud-backed dev
Serverless Framework 4.46.0Function/event configuration and an existing plugin workflowLogin or commercial licensing conflicts with your organizationV4 requires authentication; organizations over $2 million annual revenue may need a subscription. AWS charges remain separateYour team already depends on its configuration/plugins

Sources: AWS SAM overview, SST architecture and free CLI, and Serverless V4 terms. Review the latter's licence terms for your organization; do not infer that a public repository makes the whole V4 distribution MIT. No fixed AWS bill can be quoted without region and workload.

If you choose SST

In a new npm project, install sst@4.17.2 as a development dependency, then run npx sst init and choose AWS. Keep the generated sst.config.ts; add a function inside its run function:

const ping = new sst.aws.Function("Ping", {
  handler: "src/ping.handler",
});

Create src/ping.ts:

export async function handler() {
  return { statusCode: 200, body: "pong" };
}

Run npx sst dev --stage trial. Invoke the function from the printed dev interface, check pong, and use npx sst deploy --stage trial when you want an independently deployed trial. This creates a function, not an HTTP route; add the documented API Gateway component if you need HTTP. Remove disposable resources with npx sst remove --stage trial after reviewing the removal plan. SST components and CLI commands.

If you choose Serverless Framework

Follow the official setup: install with npm i -g serverless, run serverless, complete authentication and select an AWS starter. Review its generated serverless.yml, handler, runtime, region and IAM configuration. Set frameworkVersion to 4.46.0 for this evaluation. Run serverless package before serverless deploy --stage trial; check the deployed function/endpoint and remove disposable resources with serverless remove --stage trial. Authentication and AWS credentials are separate requirements; a successful login does not grant AWS access.

Recommendation by constraint

Solo learning Lambda: SAM. Small TypeScript team that wants linked resources and live cloud development: SST. Small team with working Serverless plugins: retain Serverless. Enterprise: SAM is the default when CloudFormation governance is established; otherwise use the tool the platform team supports, after checking licensing and CI authentication.

Community evidence

  • guidefari, 2026-05-23, reported “Changes to .env or .env.<stage> do not take effect” during live development in SST #6886. This is a dated report, not proof of current behavior.
  • DivMode, 2026-05-23, reported “platform source has two TypeScript errors” in SST #6885. It concerns an older release and strict infrastructure type checking; reproduce before treating it as a current blocker.

Prompt for your agent

Build one disposable function using our chosen framework. State profile, region, stage, generated resources and installed version. Prove the handler response locally where supported, then propose the cloud trial and cleanup plan. Do not deploy until the account owner approves the resource plan.

Mistakes and limits

Do not combine SST examples from older architecture generations with this new setup. Do not treat sst dev as an offline SAM substitute or forget cloud cleanup. No deployment, plugin compatibility test, pricing estimate or CI authentication test was run. Community evidence covers SST only and does not establish a winner on reliability. This is a new-app setup, not a migration guide.

Started from a post by @AWS documentation team, packaged by the editor. Original post

Subjects

More in testing

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# AWS serverless setup: SST, Serverless Framework or SAM?
Summary: When choosing a serverless setup for a first Lambda HTTP API, use SAM for local Docker testing, SST for TypeScript infrastructure with live cloud development, or Serverless Framework for an existing plugin workflow; this one-route tutorial chooses SAM.
Copy for agent
get the whatworks thread aws-serverless-setup-sst-serverless-or-sam and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread aws-serverless-setup-sst-serverless-or-sam
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks