-
Notifications
You must be signed in to change notification settings - Fork 7
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
Does not work in Amazon Linux 2018.03 OS version #3
Comments
That may explain why I'm getting an error that "document.pdf" is not found.
|
Ran into the same issue. Previous Lambda Function works just fine. @suriya Were you able to figure out how to add perl supprt to the new env? |
@wzard I have not made further progress.
…On Tue, Jun 25, 2019, 2:47 AM Siddharth Kanungo ***@***.***> wrote:
Ran into the same issue. Previous Lambda Function works just fine. @suriya
<https://github.com/suriya> Were you able to figure out how to add perl
supprt to the new env?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3?email_source=notifications&email_token=AAAKS5R7NJJV567X6ZGQQNTP4E2X3A5CNFSM4HR4IEAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYOIGTA#issuecomment-505185100>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAKS5TKMQQWID2OLVWPV5TP4E2X3ANCNFSM4HR4IEAA>
.
|
@wzard @suriya same problem here, but I think I am on the right track here is my Dockerfile for it:
And then just build and package the stuff:
Tried some simple cases and it did the job, but needs some more testing after the weekend. Feel free to try it out. Have a nice weekend |
@samoconnor - thanks a lot for this - it was just what I needed. And thanks to @Karandaras for the comment above. I can confirm that adding the perl runtime in this way works. Layers would be better, but in the short term I just added the perl dependencies directly to the same zip file. My minor modifications: Remove /man from the docker image to reduce the zip file size:
and include the paths to the perl executable and libs in the script: os.environ['PATH'] += ":/var/task/bin/"
os.environ['PATH'] += ":/var/task/texlive/2019/bin/x86_64-linux/"
os.environ['PERL5LIB'] = '/var/task/lib/perl5/5.16.3/'
os.environ['PERL5LIB'] += ":/var/task/texlive/2019/tlpkg/TeXLive/" As an aside, the approach used in this project to install texlive does not pin to a version, so the user needs to be sure to update the path to texlive accordingly. In my version I'll plan to parameterize both this and the perl version. |
Thanks @Karandaras, I was able to get my lambda function to work again. Also thanks @nhoffman for the optimizations. My lambda execution time was 7.6 seconds using 128mb for a simple latex document. Not too shabby. |
@Karandaras Worked for me as well. Thank you! |
Thanks to all for this support in this area specifically. It took me about 3 hours to go from Including both latex and perl in one lambda is difficult. I already had to strip down latex to NO extra packages, etc to get everything in under the 50MB limit. I'm thinking splitting this up into Perl in its own layer will ultimately be the way to go. To anyone that wants to just get going with Latex/Perl together to prove out the concept, I'm attaching a Docker file below. It is simply a cookbook that is based on all the helpful comments above. It's can probably be optimized even more, but this "works": Dockerfile
lambda_function.py
Test Event: Once you've uploaded your lambda, in the lambda console, paste this into "Configure test event" panel.
|
I would like to point out a quicker solution: Using the layer from ARN arn:aws:lambda:us-east-1:445285296882:layer:perl-5-34-runtime-al2-x86_64:4 (grabbed from here) works. The input example of the repo took about 1 min to run, I don't know if it's the layer's fault or python but it worked. I would like to also point out that this arn layer is from the internet and you shouldn't trust it blindly despite the fact that it works, please don't use it for sensitive documents and for a long-term solution, build your own perl layer. |
In https://aws.amazon.com/blogs/compute/upcoming-updates-to-the-aws-lambda-execution-environment/ AWS announced an upgrade to the Lambda execution environment from Amazon Linux version 2017.03 to version 2018.03.
lambdalatex
does not work in the newer environment 2018.03. Thelatexmk
command inlambdalatex
needsperl
. However,/usr/bin/perl
which was present in 2017.03 Lambda images is removed from 2018.03 images.To use
lambdalatex
we need to come up with a way to make perl available in the Lambda function. I tried the layer mentioned in https://github.com/moznion/aws-lambda-perl5-layerHowever, I got signal 11 while running
latexmk
. It is possible that that layer is built against 2017.03. I tried to build my own layer but got exit code 127 while invokinglatexmk --version
. I am not an expert in perl. Nor am I an expert in the texlive distribution. I am unable to make further progress.Do you have any thoughts on how to make
lambdalatex
work on Amazon Linux 2018.03 OS version?The text was updated successfully, but these errors were encountered: