I have lambda function which talks to an RDS Postgress instance. If I connect to VPN and run sls invoke local function -f fnName the function is able to establish the connection and execute successfully.
But when I'm running with sls offline the function fails at the DB connection part with the message TypeError: Native is not a constructor. I get the same message even though I'm not connected to the VPN as well.
been struck with this issue for the last couple of days. No clue how to solve this.
Bug Report
I have lambda function which talks to an RDS Postgress instance. If I connect to VPN and run
sls invoke local function -f fnName
the function is able to establish the connection and execute successfully.But when I'm running with
sls offline
the function fails at the DB connection part with the messageTypeError: Native is not a constructor
. I get the same message even though I'm not connected to the VPN as well.been struck with this issue for the last couple of days. No clue how to solve this.
Sample Code
Environment
serverless
version: [e.g. v3.30.0]serverless-offline
version: [e.g. v12.0.4]node.js
version: [e.g. v14.8.0]OS
: [e.g. macOS 12.4]