title: Initialize Firebase inside AWS Lambda
body: <p>I installed only <code>"firebase-auth"</code> <code>"firebase-app"</code> modules inside AWS lambda because the .zip file has to be smaller then 10mb.</p>
  
  <p>And this is my code inside AWS lambda.</p>
  
  <pre><code>var firebase = require('firebase');
  exports.handler = (event, context, callback) =&gt; {
  
    context.callbackWaitsForEmptyEventLoop = false;
  
    var config = {
      apiKey: "lnlnnl",
      authDomain: "lfirjlkje.baseapp.com",
      databaseURL: "https://kjhjkh.firebaseio.com",
      projectId: "jhkhjh-88eaf",
      storageBucket: "hj.hjappspot.com",
      messagingSenderId: "977997"
    };
  
    if(firebase.apps.length == 0) {
       firebase.initializeApp(config);
    } 
      };
  </code></pre>
  
  <p>I have <code>firebase.apps</code> undefined and <code>firebase.initializeApp</code> undefined.</p>
  
  <p>any ideas what is wrong ?</p>