-
Notifications
You must be signed in to change notification settings - Fork 27
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
Node binaries not loading from binding.js when hoisted to root of node_modules #523
Comments
My gut feeling is this has something to do with this code in binding.js --
but i'm working on verifying that by giving require() a direct path to the binary in my lambda. This will possibly confirm that this is broken when the node module gets hoisted out of signature-v4-crt and into root. |
Somewhat relevant: #490 |
yeah, something like that might work. I am having trouble getting the path because process.cwd() is /var/task on lambda so i'm going to try to force the aws-crt pkg binary into where it is "expected" and see if that works. It might be worthwhile for the sigv4-crt package to just include the binaries as well but that seems like overkill. |
This also appears to be happening on my lambda when using the implementation with just aws-crt and running crt.auth.sign() |
So just wanted to reiterate the problem here, this is a problem with the relative pathing to the nodejs binaries within the aws-crt package. This breaks when using esbuild/webpack. I was able to workaround this by doing the following:
This is a very annoying process to have to update our lambdas to use aws-crt as a layer instead of being able to bake it in with the multi-region signing npm package on top of having to update all of our services to mark it as an external package within esbuild. |
Any update? Will this support webpack/esbuild anytime soon? |
This issue will be made irrelevant by this pr, as sigv4 would the be supported natively by the js sdk. |
Describe the bug
When using @aws-sdk/signature-v4-crt it is getting an error that AWS CRT binary not present in any of the following locations:
I have verified the aws-crt package is present and I can see the binary in bin/linux-x64-glibc as aws-crt-nodejs.node. The problem is that it gets hoisted to the top level of node_modules by yarn instead of living under sigv4 package.
Runtime is AWS Lambda Node18
Expected Behavior
Not to get this error
Current Behavior
When using sigv4 CRT signing methods it gives error:
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
aws-crt-nodejs version used
1.18.3
nodejs version used
18
Operating System and version
linux2
The text was updated successfully, but these errors were encountered: