How to use the lambda-local.setLogger function in lambda-local

To help you get started, we’ve selected a few lambda-local examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rmtuckerphx / alexa-skill-serverless-starter-template / test / e2e / handlerTests.js View on Github external
before(function (cb) {
            const lambdalocal = require("lambda-local");
            lambdalocal.setLogger(winston);
            const lambda = require('../../src/main.js');
            let event = getEvent('AMAZON.StopIntent.json');

            lambdalocal.execute({
                event: event,
                lambdaFunc: lambda,
                lambdaHandler: functionName,
                region: region,
                profileName : profileName,
                callbackWaitsForEmptyEventLoop: false,
                timeoutMs: timeoutMs,
                callback: function (_err, _done) {
                    done = _done;
                    err = _err;

                    if (done) {
github rmtuckerphx / alexa-skill-serverless-starter-template / test / debugger / main.js View on Github external
var event = require('../requests/LaunchRequest.json');

event.session.application.applicationId = config.skillAppID;
event.request.useLocalTranslations = false;

var lambdalocal = require("lambda-local");
var winston = require("winston");
var lambda = require('../../src/main.js');

var functionName = "handler";
var timeoutMs = 3000;
var region = config.region;
var profileName = config.awsProfile;

winston.level = "error";
lambdalocal.setLogger(winston);



lambdalocal.execute({
    event: event,
    lambdaFunc: lambda,
    lambdaHandler: functionName,
    region: region,
    profileName : profileName,
    callbackWaitsForEmptyEventLoop: false,
    timeoutMs: timeoutMs,
    callback: function (_err, _done) {
        done = _done;
        err = _err;

        if (done) {

lambda-local

Commandline tool and API to run Lambda functions on your local machine.

MIT
Latest version published 7 months ago

Package Health Score

72 / 100
Full package analysis