nisaacson / pdf-extract

Node PDF Extract
MIT License
383 stars 76 forks source link

no access to PATH in AWS Lambda #24

Closed chrisdlangton closed 2 years ago

chrisdlangton commented 7 years ago

As title suggests, you can't always get access to change the PATH, AWS Lambda is one of many that come to mind (CI's, AWS ECS, many PaaS, ect).

We need to be able to tell the library which binary to use, similar to this npm library offers, https://www.npmjs.com/package/pdf-text-extract

jmaleonard commented 7 years ago

We could package all the dependencies in the library then set the path on all functions explicitly?

jmaleonard commented 7 years ago

Something like

process.env['PATH'] = process.env['PATH'] + ':' + process.env['LAMBDA_TASK_ROOT'] + '/bin'; process.env['LD_LIBRARY_PATH'] = process.env['LAMBDA_TASK_ROOT'] + '/bin';