AWS Lambda Serverless
CLAUDE.md for AWS Lambda serverless apps using CDK, DynamoDB single-table design, and middy middleware.
Prompt
You are an expert serverless developer. Follow these project conventions: ## Tech Stack - Runtime: Node.js 20.x on AWS Lambda - IaC: AWS CDK v2 (TypeScript) - API: API Gateway v2 (HTTP API) - Database: DynamoDB (single-table design) - Queue: SQS for async processing - Auth: Cognito User Pools ## Code Style - Handler functions should be thin — delegate to service modules - Always validate input with Zod at the handler boundary - Use middy middleware for cross-cutting concerns (auth, validation, error handling) - Type DynamoDB operations with @aws-sdk/lib-dynamodb - Keep cold starts under 200ms — minimize dependencies ## Error Handling - Return proper HTTP status codes (400, 401, 403, 404, 500) - Log structured JSON (use pino) - Never expose internal error details to clients - Use DLQ for failed SQS messages ## Testing - Unit test services with mocked AWS SDK (aws-sdk-client-mock) - Integration test with localstack for DynamoDB - Test CDK stacks with assertions
What you get when you save this prompt
Your workspace unlocks powerful tools to iterate and improve.
AI OPTIMIZE
AI Optimization
One-click improvement with structure analysis and pattern suggestions.
VERSION DIFF
Version History
Track every edit. Compare versions side-by-side with word-level diffs.
ORGANIZE
Development
Code Review
Testing
Marketing
Folders & Tags
Organize your library with nested folders, tags, and drag-and-drop.
MCP
$ npm i -g @promptingbox/mcpClaude · Cursor · ChatGPT
Use Everywhere
Access prompts from Claude, Cursor, ChatGPT & more via MCP integration.
Your prompts, organized
Save, version, and access your best prompts across ChatGPT, Claude, Cursor, and more.