title: node-lambda - TypeError: handler is not a function
body: <p>New to AWS and found it quite straightforward so far but really getting stuck packaging a lambda function.</p>
  
  <p>I'm using node-lambda to try and run the function but keep getting the following error on node-lambda run:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>/usr/local/lib/node_modules/node-lambda/lib/main.js:93
        handler(event, context, callback);
        ^
  
  TypeError: handler is not a function
      at Lambda._runHandler (/usr/local/lib/node_modules/node-lambda/lib/main.js:93:7)
      at Lambda.run (/usr/local/lib/node_modules/node-lambda/lib/main.js:49:8)
      at Command.&lt;anonymous&gt; (/usr/local/lib/node_modules/node-lambda/bin/node-lambda:89:12)
      at Command.listener (/usr/local/lib/node_modules/node-lambda/node_modules/commander/index.js:301:8)</code></pre>
  </div>
  </div>
  </p>
  
  <p>My index.js file has the handler declared like so </p>
  
  <pre><code>exports.myHandler = function(event, context) {
  </code></pre>
  
  <p>And the AWS_HANDLER in my .env is set to index.handler. I eel like I'm missing an obvious step.</p>