Skip to content

Commit

Permalink
fix: lambda env detection
Browse files Browse the repository at this point in the history
AWS_LAMBDA_* vars are provided by environments that emulate Lambda env, e.g. serverless invoke local
  • Loading branch information
medikoo committed Nov 10, 2017
1 parent 84db996 commit 60d9bfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

if (!process.env.AWS_LAMBDA_LOG_STREAM_NAME) return; // Do not proceed in non AWS lambda env
if (!process.env.AWS_EXECUTION_ENV) return; // Do not proceed in non AWS lambda env

var format = require("util").format
, logger = require("log4")
Expand Down

0 comments on commit 60d9bfc

Please sign in to comment.