I'm creating an AWS lambda function with NodeJS which will call to an AWS RDS instance. To do this I'm using the 'MariaSql' module. The function executes perfectly from my local command line, but after zipping the file and uploading it to Lambda, I receive this error:
"errorMessage": "Module did not self-register.",
"errorType": "Error",
"stackTrace": [
"Object.Module._extensions..node (module.js:434:18)",
"Module.load (module.js:343:32)",
"Function.Module._load (module.js:300:12)",
"Module.require (module.js:353:17)",
"require (internal/module.js:12:17)",
"Object.<anonymous> (/var/task/node_modules/mariasql/lib/Client.js:13:11)",
"Module._compile (module.js:409:26)",
"Object.Module._extensions..js (module.js:416:10)",
"Module.load (module.js:343:32)"
]
I have built the program in EC2 and included an init: npm install in the package.json in the hopes that the module would reigster/be created. I've also tried deleting and re-installing node_modules as well as trying npm rebuild to no avail.