-
-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python Example #34
Comments
I had to use AWS Lambda Python3.6 to make this work. Python3.8 Runtime for AWS Lambda does not include curl, tar or zip any more among other packages. |
While I think I got to the same spot where you got. I changed the /opt/instdir/program/soffice to /opt/instdir/program/soffice.bin but then I got
While this is probably laughable here is my code:
I was not able to figure anything about how to get around the missing curl, tar and other dependencies so I decompress the file and uploaded it to an s3 bucket. I work with a company that has to have relatively not dependencies because we work with sensitive data all the time. So I went through all the steps on here but have hit a snag with the 3.8 solution. Guess I will have to settle for the 3.6 solution for now. |
So while I could have worked with the NPM module to get tar and brotli to decompress the file I decided to to decompress it locally on my machine (using peazip) and upload just a zip file of the file to a different S3 bucket from the drop buck and the output bucket. Note: The zip file decompression is handled in memory and not saved to the system until extractall("/tmp") so you may need to allocate roughly 200-300 more memory to this function if you are under the max. I used 1600 for this code example. Below I have working python 3.8 code:
|
Seems the python example no longer works that is located here:
https://github.com/vladgolubev/serverless-libreoffice/blob/master/STEP_BY_STEP.md
Seems tar/zip is no longer available in amazon linux 2 python3.8
Ive also attempted to make it a layer, but I get this error when running it:
sh: /opt/instdir/program/soffice: No such file or directory
Even though it clearly is there.
Anyone else get this working?
The text was updated successfully, but these errors were encountered: