The platform architecture: Serverless AWS Lambda using Couchbase as database. It works fine when we tried serverless local invoke but upon deploying to AWS Lambda, getting the below error:
{
"errorType": "Error",
"errorMessage": "/var/task/node_modules/couchbase/build/Release/couchbase_impl.node: invalid ELF header",
"stack": [
"Error: /var/task/node_modules/couchbase/build/Release/couchbase_impl.node: invalid ELF header",
" at Object.Module._extensions..node (internal/modules/cjs/loader.js:807:18)",
" at Module.load (internal/modules/cjs/loader.js:653:32)",
" at tryModuleLoad (internal/modules/cjs/loader.js:593:12)",
" at Function.Module._load (internal/modules/cjs/loader.js:585:3)",
" at Module.require (internal/modules/cjs/loader.js:692:17)",
" at require (internal/modules/cjs/helpers.js:25:18)",
" at bindings (/var/task/node_modules/couchbase/node_modules/bindings/bindings.js:112:48)",
" at Object.<anonymous> (/var/task/node_modules/couchbase/lib/binding.js:214:36)",
" at Module._compile (internal/modules/cjs/loader.js:778:30)",
" at Object.Module._extensions..js (internal/modules/cjs/loader.js:789: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.