Registry / devops / openapi-lambda-adapter

openapi-lambda-adapter

JSON →
library1.4.0jsnpmunverified

JavaScript/TypeScript library for making AWS Lambda to Lambda calls using openapi-client-axios. Current stable version is 1.4.0, active development. Provides a 'getLambdaRunner' function that wraps the AWS Lambda client to enable direct microservice-to-microservice invocations via OpenAPI operations, eliminating the need for API Gateway. Key differentiator: integrates with openapi-client-axios for type-safe API calls, supports IAM for permission management, and uses AWS SDK v3 for smaller bundle size. Requires Node.js >= 12.

devops
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Package is ESM-only; using require() may fail in Node.js < 12 or without transpilation. TypeScript included.

import { getLambdaRunner } from 'openapi-lambda-adapter'

Shows how to initialize openapi-client-axios with an OpenAPI definition and register a Lambda runner to make direct Lambda-to-Lambda calls.

import OpenAPIClientAxios from 'openapi-client-axios'; import { getLambdaRunner } from 'openapi-lambda-adapter'; const api = new OpenAPIClientAxios({ definition: 'https://example.com/api/openapi.json' }); const client = api.initSync(); client.api.registerRunner(getLambdaRunner('target-lambda-name')); const res = await client.createPet(null, { name: 'Garfield' }); console.log('Pet created', res.data);
Debug
Known footguns
breakingSwith from AWS SDK v2 to v3 in version 1.x requires updating imports and configuration for Lambda client.
gotchaMust define lambda invoke policy in IAM to allow the calling Lambda to invoke the target Lambda.
gotchaTarget Lambda must be in the same AWS account and region, and the function name is case-sensitive.
gotchaopenapi-client-axios client initialization must be done before registering the Lambda runner.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
7 hits · last 30 days
bingbot
1
mj12bot
1
ahrefsbot
1
Resources