Skip to content

Install Guide (Lambdas)

Requirements

The NerdVision Node.js agent will run in all currently supported AWS Lambda runtimes.

Install Dependency

The first step is to install the NerdVision dependency into your project. We recommend using npm or yarn.

npm i @nerdvision/agent
yarn install @nerdvision/agent

Now you need to call NerdVision in your function.

const {nerdvision} = require("@nerdvision/agent");

module.exports.handler = async (event) => {
    await nerdvision.initLambda({
        api_key: process.env.NV_API_KEY
    })
    return {
        name: event.name
    }
};

You also need to provide the API key to for NerdVision. To do this, add the environment variable NV_API_KEY to the lambda environment. See our example project nerd-vision / examples / aws-lambdas / node.js-lambda

Lambda Impact

Changes to your lambda runtime can have an effect on the cost of the lambda. We strive to ensure we have as minimal impact as we can. If you see a change to your lambda performance please contact support.