Example code showing how to communicate an AWS Lambda function with an external Lambda extension.
Written in Node.js with no dependencies for minimal footprint, the code was based on nodejs-example-extension repository. Check it out for more details on how to build an extension.
There are three components to this sample:
function/
: Contains the Lambda function codeextensions/
: Will be extracted to /opt/extensions where the Lambda platform will scan for executables to launch extensionsnodejs-example-extension/
: Will be extracted to /opt/nodejs-example-extension which is referenced by theextensions/nodejs-example-extension
executable and includes a nodejs executable along with all of its necessary dependencies.
- Access webhook.site and copy your unique URL
- Open
template.yaml
file and replace theDISPATCH_POST_URI
environment variable value with your unique URL
sam build
sam deploy --guided