title: How do I deploy monorepo code to AWS Lambda using lerna?
body: <p>I am attempting to make two AWS Lambda functions (written in typescript). Both of these functions share the same code for interacting with an API. In order to not have to copy the same code to two different Lambdas, I would like to move my shared code to a local module, and have both my Lambdas depend on said module.</p>
  
  <p>My initial attempt at staring code between the two lambdas was to use a monorepo and lerna.  My current project structure looks like this:</p>
  
  <pre><code>- lerna.json
  - package.json
  - packages
    - api
      - package.json
    - lambdas
      - funcA
        - package.json
      - func B
        - package.json
  </code></pre>
  
  <p>lerna.json:</p>
  
  <pre><code>{
    "packages": [
      "packages/api",
      "packages/lambdas/*"
    ],
    "version": "1.0.0"
  }
  </code></pre>
  
  <p>In each of my package.json for my Lambda functions, I am able to include my local api module as such:</p>
  
  <pre><code>"dependencies": {
      "@local/api": "*"
  }
  </code></pre>
  
  <p>With this, I've been able to move the common code to its own module. However, I'm now not sure how to bundle my functions to deploy to AWS Lambda. Is there a way for lerna to be able to create a bundle that can be deployed?</p>