-
Notifications
You must be signed in to change notification settings - Fork 604
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
Fail gracefully if gRPC isn't available #1297
Comments
@stephenplusplus, in aws lambda, we need to package and push the node_modules from local. It does not have a way to run npm install. I was able to work around the problem by using the gcloud module which was install on linux box. |
Ah, okay. Does that "Native Modules" section in this guide explain something similar to what you had to do? @jgeewax Code that was compiled for one environment was copied to another that didn't match. Under a normal installation -> run cycle, if a dependency cannot be installed, |
OK, I hear where you're coming from @stephenplusplus , however the end goal is "gcloud-node should work inside AWS lambda"... Can we figure out how to do that ? |
Yeah, I think @pputhran can fill us in on that experience. That guide I linked above is from AWS specifically for using Node modules that have native dependencies, like ours. We of course aren't the only such dependency a user might have, so the solution should likely come from the AWS side on how it can be made as easy as possible. |
Im running into this issue too, is there a way to build an aws lambda friendly gcloud-node module? |
@pputhran @ajagnanan can you guys try out https://github.com/tomdale/lambda-packager? Looks like it might be just what we need. |
@stephenplusplus thank you. this looks like what we need. will try this and let you know |
Great, if it works for you and @ajagnanan, we'll add it to our Troubleshooting guide. |
I'm developing on a mac. What I did was compile 2 versions of the module, 1 locally on my mac and 1 on an ec2 instance which I copied down locally. I put these two in a separate folder (/bin). I then set up hook scripts to copy the version needed for the environment i'm running on to the node_modules folder. I haven't tested the lambda-packager yet, but this would save me from manually compiling it on an ec2 instance if it works. For reference, I'm using https://github.com/serverless/serverless with plugin https://github.com/kennu/serverless-plugin-hookscripts. |
Thanks for the breakdown @ajagnanan. Have you tried lambda-packager yet? |
@pputhran if you've tried it yet, how did it go? |
I have encountered the same issue. Can someone help me resolve this issue? Since there hasn't been any recent posts on this issue, I assume there is a way to resolve this. I tried lambda-packager and it seems like the repository is deprecated. |
👋 Which specific module are you trying to use? |
Hi @JustinBeckwith, I am using the module
|
@anil100nair thanks for the details! Would you mind opening a new issue on this repository? Thank you :) |
Thanks you for your time. I'll open an issue. |
Re #1287 , seems like there are cases where gRPC won't be able to be initialized. I understand if a service that requires gRPC (ie, Bigtable) failed in these cases, but if an unrelated module fails because of the unused gRPC import, that makes me sad....
Can we try to fail gracefully if gRPC isn't installed in the environment for whatever reason?
The text was updated successfully, but these errors were encountered: