
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@anttiviljami/openapi-lambda-adapter
Advanced tools
JavaScript client library for integrating AWS Lambdas with openapi-client-axios
JavaScript/Typescript library for making AWS Lambda to Lambda calls via openapi-client-axios .
client.api.registerRunner(getLambdaRunner('target-lambda-name'))
client.getPet(1)
client.searchPets()
client.searchPets({ ids: [1, 2, 3] })
client.updatePet(1, payload)
Resources:
MyLambda:
Type: AWS::Serverless::Function
Properties:
...
Policies:
- LambdaInvokePolicy:
FunctionName: target-lambda-name
npm install --save openapi-client-axios openapi-lambda-adapter
Setup for single lambda handling all API Gateway requests
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);
Setup for multiple lambdas, each lambda handling one API Gateway resource
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.getOperations().forEach((operation) => {
const lambdaName = ... get lambda-name for operationId
client.api.registerRunner(getLambdaRunner(lambdaName), operation.operationId)
})
const res = await client.createPet(null, { name: 'Garfield' });
console.log('Pet created', res.data);
const resp = await client.getPet({ id: 1 }, null);
console.log('Pet retrieved', resp.data);
FAQs
JavaScript client library for integrating AWS Lambdas with openapi-client-axios
We found that @anttiviljami/openapi-lambda-adapter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.