@jaypie/lambda
AWS Lambda wrappers and lifecycle management.
Overview
Section titled “Overview”@jaypie/lambda provides AWS Lambda integration for the Jaypie library, including:
- Lambda handler wrapper with lifecycle management
- Event/context integration
- Error handling for Lambda environments
Installation
Section titled “Installation”npm install @jaypie/lambdaKey Features
Section titled “Key Features”Lambda Handler
Section titled “Lambda Handler”Wraps AWS Lambda functions with Jaypie’s handler lifecycle:
import { lambdaHandler } from "@jaypie/lambda";
export const handler = lambdaHandler(async (event, context) => { // Handler logic return { statusCode: 200, body: JSON.stringify({ success: true }) };});Lifecycle Integration
Section titled “Lifecycle Integration”The lambdaHandler integrates AWS Lambda event and context with the standard handler lifecycle:
- Validate - Event validation
- Setup - Resource initialization
- Handler - Business logic
- Teardown - Cleanup (always runs)
Error Handling
Section titled “Error Handling”Automatic error handling and formatting for Lambda responses.
API Documentation
Section titled “API Documentation”API documentation will be generated from TypeScript definitions.
Related Packages
Section titled “Related Packages”- @jaypie/core - Core utilities
- @jaypie/express - Express.js integration
- @jaypie/aws - AWS service integrations