Stack:
TS Lambda (Serverless)
TypeScript Lambda preset
A reasoning guide the onboard flow uses for serverless TypeScript Lambda projects. It is a checklist, not a template — detected reality wins.
Signals
- A deploy descriptor:
serverless.yml(Serverless Framework),template.yaml(AWS SAM), orcdk.json(AWS CDK), alongsidetsconfig.json. - Handler functions exporting
handler, often undersrc/functions/orsrc/handlers/, with one entry point per function.
What to reason about
- The real gate: lint (
eslint), type-check (tsc --noEmit), test (Jest/Vitest), bundle (esbuild/tsc), and synth/package (sls package,sam build,cdk synth) — captured verbatim. - Per-function structure, the event sources (API Gateway, SQS, EventBridge), and the cold-start/bundle-size budget.
- IAM scope — least privilege per function — and where secrets and config live (SSM, Secrets Manager, env).
Notes
Emphasize least-privilege IAM in SECURITY docs. Synth/package is the safe gate; deploy mutates the account and must not run as validation.