I was given a .zip file that had an external library called Python PDF Toolkit, often abbreviated as pdftk or pypdftk.
To my current knowledge, this external dependency was built on a EC2 instance of CentOS6, because the pdftk has its own dependency called libgcj.
As you can see from the image, most of the files are Unix Executable Files, and are missing their file extensions.
Will this create problems in Lambda? I believe the pdftk needs to be uploaded as a Lambda Layer to help extend the standard core Python Library.
If this will create problems executing Lambda, are there any steps I can take to find the file extensions?
Lastly, I can edit this question and add the code within these files if you believe that will help.
WHEEL
Wheel-Version: 1.0
Generator: bdist_wheel (0.35.1)
Root-Is-Purelib: true
Tag: py2-none-any
It looks like this won't work with Py3?
CodePudding user response:
pypdftk is a wrapper for pdftk binary. So you need 2 things:
- Install the pdftk binary as a Lambda Layer. For more details look here.
- You also need the python code. It seems that this is only a python file. You can either copy it directly or your code or install it with pip. It should work with python 3.
You have been provided with a wheel package. Chances are that it won't work with lambda and python 3, although it isn't impossible to properly configure everything. It should be easier to install pypdftk and binary dependencies from scratch.