AWS Serverless Development Patterns
Paste the following prompt into your AI chat to install this skill:
Please install @org-02qudk26/aws-serverless according to https://skillhub.cn/install/skillhub.md.
About this skill
Problem Being Solved
In AWS Serverless, many production issues are not caused by missing frameworks, but by missing reusable function structure: Lambda needs consistent event parsing, error handling, and API Gateway-compatible responses; asynchronous jobs need reliable message consumption, retry of failed items, and visibility timeout control. This skill breaks those concerns into practical patterns that help engineers write more production-like function code in Node.js and Python.
Core Capabilities and Steps
- Lambda Handler Pattern: Initialize clients outside the handler to reduce per-invocation overhead; use
try/catchortry/exceptto capture errors, logrequestIdand stack traces, and return responses withstatusCode,headers, andbody. - Event-Driven SQS Pattern: Bind an
SQSqueue in a SAM template, configureVisibilityTimeout,maxReceiveCount, and a dead-letter queue; iterate throughRecordsin the handler and write failed items intobatchItemFailuresfor partial batch failure handling. - Anti-Patterns and Sharp Edges: Warn against monolithic Lambda, large dependencies, and synchronous calls inside a VPC, and highlight runtime details such as cold starts, timeouts, memory, and event-loop waiting.
Scope and Caveats
The material focuses on common development patterns for AWS Lambda, API Gateway, DynamoDB, and SQS, so it is not a substitute for architecture decisions. Before use, confirm queue timeouts, permissions, environment variables, and target service versions; in production, add logging, metrics, least-privilege IAM, and cost monitoring.
Use Cases
- Use when building Node.js Lambda handlers for API Gateway with consistent error responses
- Use when wiring SQS-triggered Lambda to consume messages with batch failures and DLQ
- Use when debugging Lambda cold starts, timeouts, VPC connections, and memory settings
- Use when implementing Python Lambda queries against DynamoDB with requestId logging
Best For
- Engineers maintaining Lambda API backends who need consistent error codes and response shapes
- Engineers building async pipelines who need SQS batch processing and DLQ retry rules
- Engineers optimizing performance who need to debug Lambda cold starts and VPC timeouts
- Engineers migrating Python or Node.js functions who need reusable production-grade handler patterns
Related Skills
Guides Java Spring Boot backend development across REST APIs, data access, security, microservices, testing, deployment, and troubleshooting.
A systematic code error fixing skill that follows a five-step workflow: Reproduce, Isolate, Understand, Fix, Verify, to help developers resolve code errors.
Restores Lanhu designs to target framework code using schema JSON, design tokens, and image assets.
Automatically detects engineering or competition code, analyzes bugs, vulnerabilities, algorithm complexity, and edge cases, then produces risk-level findings with before/after fixes.