The platform architecture: Serverless AWS Lambda using Couchbase as database and connect using Lounge library. It works fine when we tried serverless local invoke but upon deploying to AWS Lambda, getting the below error:
Error: /var/task/node_modules/couchbase/build/Release/couchbase_impl.node: invalid ELF header
at Object.Module._extensions..node (module.js:681:18)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at bindings (/var/task/node_modules/bindings/bindings.js:84:48)
at Object.<anonymous> (/var/task/node_modules/couchbase/lib/binding.js:213:36)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
The closer thing i came across is this: Invalid ELF header Node js with couchbase db
but not sure how to install platform specific in aws lambda. I ruled out the webpack and package dependecies.
Version: node: 8.10.0 npm: 6.4.1 npm package couchbase: 2.6.4 npm lounge: 0.26.0