Skip to content

@jaypie/lambda

AWS Lambda wrappers and lifecycle management.

@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
Terminal window
npm install @jaypie/lambda

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 }) };
});

The lambdaHandler integrates AWS Lambda event and context with the standard handler lifecycle:

  1. Validate - Event validation
  2. Setup - Resource initialization
  3. Handler - Business logic
  4. Teardown - Cleanup (always runs)

Automatic error handling and formatting for Lambda responses.

API documentation will be generated from TypeScript definitions.