-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
add pre builds for aws lambda #155
Comments
Hey @julianhille Any progress on this? |
I'm not even sure if this is really needed. It builds and would just be a matter of hours to release it. Are you able to test it? |
I am actually not able to test it as I am currently facing an issue with puppeteer on lambda, was not able to launch chrome during run time. |
Any updates on this? facing a few issues to make it to work on a aws lambda. |
Ok this really is still an issue? Thanks for telling. I need to decide what we need to fake as there is no such thing as a "special aws" Linux. Would you be able to test a release candidate / beta / pre-release or so if I'd create one? |
I'd be happy to help in any way as I'd like support for this as well |
#156 |
please have a look and test if the prebuilts work and the if the readme is enough to understand how to use it on/with aws lambda. |
Will do that tomorrow for sure. Thanks @julianhille for the effort on this. |
@vamshi9 and @kevinvoduy you both could check if that helps |
I was able to verify that build Steps to reproduce:
No longer seeing |
That is interesting as this file has not changed. The only files having changed are, according to the readme and the code I changed, |
@kevinvoduy is it possible to chat with you somehow / somewhere to find this issue a bit faster? If not:
|
Hey Julian, I'll be checking for messages from here for the rest of the day. I'm zipping the package on mac. I first replace the muhamarra.node ( I didn't run any specific commands. Right-click on the nodejs folder and "Compress". I can spin up a ubuntu docker container and zip it there instead? |
Ok so you are just execute |
correct |
Ok. There is the issue. Muhammara, along with a lot of other modules which needs compiling or are in any case specific for a platform, can't be installed on platform x (windows for ex) and then transfer the files over to another platform. You need to tell npm what platform you want to install to. |
I'll look into that and provide an update. |
or after npm install: |
A third option is more complex but would be the most correct variant: take a docker container from aws lambda for your node version as base. |
I'm attempting to get this working but not having any luck. I'm on Node 16.x for AWS, so I grabbed the binding from I'll try your docker container suggestion next. |
That should kinda end up the same. Could you attach your zipped package or at least the node modules dir before unloading? |
Sure thing, here's my node_modules (it only contains muhammara) If you'd like, I could make a dummy lambda that processes a pdf from a base64-encoded body POST if you have access to aws lambda to test it as well. |
ok this should work on aws with node v16. are you using v16? |
Yeah create a tiny project and upload it which just returns a somehow edited pdf. |
I'm sorry now I get it. The pdf is broken without an error by muhammara. Could you also attach the pdf? And what calls against muhammara are you doing? Sometime ago when it was hummus I once fixed an pdf Font issue with a segfault in the Linux part of hummus. |
Sure thing, here's the lambda. The code is un-minified so you should be able to read through it, i've also included the successfully output pdf run on my m1 macbook pro. If you are uploading it to lambda, the handler is |
Just as an additional piece of data, I also tried running the same code on aws lambda with node14 and the node14 bindings and same problem. |
i'm not sure if you want the pdf or the domain exposed thats why i do not upload the correct pdf, but the file is kinda fine. Its just base64 encoded.
|
Interesting.... thank you for this clue! I'll report when I figure out how to make this work. |
So the trick that got it to work... makes me feel quite silly. I had to set my request header to include |
Also just as a note, both the standard linux and the specially-made aws binding work fine. |
Thank you for reporting back, great to hear you could solve it.
Thank you so much for reporting this too. So im closing this for now. |
aws lambda linux is not compatible to a normal linux build
The text was updated successfully, but these errors were encountered: