aws / aws-lambda-nodejs-runtime-interface-client

Apache License 2.0
179 stars 56 forks source link

Remove native dependencies. #8

Open calavera opened 3 years ago

calavera commented 3 years ago

Use the http module for all the runtime interactions.

This change allows the interface to work on MacOS and Windows, since it doesn't depend on Linux native code anymore.

I've tested these changes with the emulator and they seem to be working as expected.

I think this is a better option than #4

/cc @mraerino

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

paambaati commented 3 years ago

+1 for landing this. The current v1.0.0 release doesn't always work correctly in multi-stage builds — I install all build-time dependencies in the first builder stage, install this package, then copy node_modules over to the next stage. It refuses to run because of a missing runtime dependency, nghttp2-libs.

This PR vastly simplifies the package, makes it easier to maintain and contribute to, and embraces Node's native capabilities.

missinglink commented 3 years ago

Looks like this PR will resolve https://github.com/aws/aws-lambda-nodejs-runtime-interface-client/issues/28 ?

piyushhajare commented 3 years ago

We are facing the same issue with CENT OS- /aws-lambda-ric/build/Release/runtime-client.node: undefined symbol: _ZN3aws14lambda_runtime7runtimeC1ERKSsS3

Can someone please let us know when this fix will be available? Or till then if there is any workaround then please let us know.

donn commented 2 years ago

How this has still not been merged is truly beyond me. /preinstall.sh continues to fail for the weirdest reasons.

anthony-telljohann commented 2 years ago

Any chance we can get this PR merged in? I'm not able to use a custom CentOS 7 docker image with my lambda. Getting the same error that's reported in https://github.com/aws/aws-lambda-nodejs-runtime-interface-client/issues/14

jbutz commented 2 years ago

Getting this PR merged would be very helpful, the pre-build script is causing issues with this package on our CI server. We aren't even using anything that gets built.

missinglink commented 2 years ago

@jbutz AWS literally couldn't care less, I wouldn't hold out any hope of them responding to any PRs or merging anything here.

anthony-telljohann commented 2 years ago

It was easier and faster to migrate my lambda to python than to get AWS to fix this node module.

paolomainardi commented 2 years ago

i had to install nghttp2-libs on a custom alpine docker multi-stage build image, i cannot find any reference on the official doc.

smerrill commented 1 year ago

I published https://www.npmjs.com/package/@stevenmerrill/aws-lambda-ric as current main branch v1.0.0 with this PR merged. This is totally unsupported; use at your own risk.

cooper667 commented 1 year ago

It was easier and faster to migrate my lambda to python than to get AWS to fix this node module.

Just done the same 😬