title: Advantage of using individual require in AWS lambda functions
body: <p>Here is my pseudo project:</p>
  
  <pre><code>/- utils
       +- func1.js
       +- func2.js
       +- index.js
  
  /- main
       +- index.js 
  </code></pre>
  
  <p>In <code>main/index.js</code> I can simply require all necessary functions simply like this:</p>
  
  <pre><code>const { func1, func2 } = require('../utils');
  </code></pre>
  
  <p>That works okay.</p>
  
  <p>Let's assume there is much more functions - each in individual file and I  only need a few of them.</p>
  
  <p>Is there any advantage/disadvantage of using destructuring?</p>
  
  <p>I mean instead of:</p>
  
  <pre><code>const { func1, func2, func5 } = require('../utils');
  </code></pre>
  
  <p>Require each function individually like this:</p>
  
  <pre><code>const { func1 } = requrie('../utils/func1');
  const { func2 } = requrie('../utils/func2');
  const { func5 } = requrie('../utils/func5');
  </code></pre>
  
  <p>The first solution is much cleaner IMHO but can there be a performance issue when there is much more functions? Any other disadvantages like size of deployed lambda?</p>
  
  <p>This is the code used in AWS Lambda functions.</p>