Search code examples
node.jsaws-lambdanode-oracledb

How to set env variable or use instant client library in AWS Lambda


Whwn using NodeJS function which connect to Oracle RDS, I'm getting the error:

DPI-1047: 64-bit Oracle Client library cannot be loaded: "libaio.so.1: cannot open shared object file: No such file or directory

I'm following this deployment package structure:

instant_client_12.1
node_modules
index.js

Solution

  • Is libaio.so.1 in the /lib directory of the package your deploy to your Lambda?

    As for the Env variables for Lambda, you can set these in the Console: LambdaEnv

    ...or using CloudFormation