
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
lambda-edge-server
Advanced tools
AWS CloudFront Lambda@Edge function handler emulator.
Provides a translation layer between Node.js HTTP server and Lambda function response format. The goal is simplify local testing without the need for complex dependencies.
Install this package using NPM:
$ npm install lambda-edge-server
The following origin-request/origin-response format is currently supported.
/**
* @see AWS::Serverless::Function
*/
exports.handler = function(event, context, callback) {
const response = {
status: '200',
statusDescription: 'OK',
headers: {
'cache-control': [{
key: 'Cache-Control',
value: 'max-age=0'
}],
'content-type': [{
key: 'Content-Type',
value: 'text/html'
}]
},
body: 'Success',
};
callback(null, response);
};
/**
* @see AWS::Serverless::Function
*/
exports.handler = async function(event) {
const response = {
status: '200',
statusDescription: 'OK',
headers: {
'cache-control': [{
key: 'Cache-Control',
value: 'max-age=0'
}],
'content-type': [{
key: 'Content-Type',
value: 'text/html'
}]
},
body: 'Success',
};
return response;
};
Launch HTTP server instance, run the function:
$ npm start ./path/to/script.js
Run ESLint on project sources:
$ npm run lint
Run Mocha integration tests:
$ npm run test
Going forward, it is recommended that you build your L³ application using async handlers in anticipation of the AWS changes below.
AWS Lambda plans to remove support for callback-based function handlers starting with Node.js 24. You will need to update this function to use an async handler to use Node.js 24 or later. For more information and to provide feedback on this change, see aws/aws-lambda-nodejs-runtime-interface-client#137
While backwards compatibity will be supported for older Node.js releases this support will eventually be phased out with the deprecation of nodejs22.x (Apr 30, 2027).
See AWS Node.js Supported Runtimes for support information.
If you fix a bug, or have a code you want to contribute, please send a pull-request with your changes. (Note: Before committing your code please ensure that you are following the Node.js style guide)
This package is maintained under the Semantic Versioning guidelines.
This package is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.
lambda-edge-server is provided under the terms of the MIT license
AWS is a registered trademark of Amazon Web Services, Inc.
FAQs
AWS CloudFront Lambda@Edge handler function emulator.
We found that lambda-edge-server demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.