# Calling PDFkit from Lambda function (recent breaking changes?)

**URL:** <https://answers.netlify.com/t/calling-pdfkit-from-lambda-function-recent-breaking-changes/23220>\
**Category:** Support\
**Tags:** lambda-functions\
**Created:** [September 24, 2020, 9:50pm UTC](https://answers.netlify.com/t/calling-pdfkit-from-lambda-function-recent-breaking-changes/23220 "2020-09-24T21:50:55Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![jen](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/jen/32/6044_2.png) [@jen](https://answers.netlify.com/u/jen)\
**Post date:** [October 1, 2020, 8:09pm UTC](https://answers.netlify.com/t/calling-pdfkit-from-lambda-function-recent-breaking-changes/23220/3 "2020-10-01T20:09:43Z")

</div>

Hey @broeker,  
Nothing particularly conclusive or satisfying to share on this, but I wanted to let you know we spent some time on it. It looks like you may be running into something similar to this person:

> [@Folder structure of function deployment differs](https://answers.netlify.com/t/folder-structure-of-function-deployment-differs/21221/13):
>
> Ok, the explanation was even simpler: If you embed a library that needs to be installed into node\_modules in the function, the file structure of the system is different. Here is the reproduction: The repository contains a no-node\_modules.js and a with-node\_modules.js function. Here is some logging output that shows their file system structure: no-node\_modules.js: INFO process.env.LAMBDA\_TASK\_ROOT /var/task INFO # content of process.env.LAMBDA\_TASK\_ROOT INFO [ 'no-node\_modules.js', 'src'…

As my colleague mentions at the end of that thread, we’ll need to investigate and get this properly documented. There are many places where changes ~~may have~~ have definitely happened since June that could have impacted these paths:

- [GitHub - netlify/zip-it-and-ship-it: Intelligently prepare Node.js Lambda functions for deployment](https://github.com/netlify/zip-it-and-ship-it/)
- [GitHub - netlify/build: Netlify Build (node process) runs the build command, Build Plugins and bundles Netlify Functions. Can be run in Buildbot or locally using Netlify CLI](https://github.com/netlify/build/)
- our proxy, which forwards your function request to AWS
- [Document history - AWS Lambda](https://docs.aws.amazon.com/lambda/latest/dg/lambda-releases.html)

I wish I had more to share but I hope this helps!

---

_[View the full topic](https://answers.netlify.com/t/calling-pdfkit-from-lambda-function-recent-breaking-changes/23220)._
