Environmental variables are not properly loading in Lambda with serverless-plugin-write-env-vars
serverless-plugin-write-env-vars users dotenv npm internally and creates .env file in serverless deploy stage so that it bundles inside the zip for deployment. However dotenv requires to run the following code as early as possible in the application at execution.
Environmental variables are not properly loading in Lambda with serverless-plugin-write-env-vars
serverless-plugin-write-env-vars users dotenv npm internally and creates .env file in serverless deploy stage so that it bundles inside the zip for deployment. However dotenv requires to run the following code as early as possible in the application at execution.
require('dotenv').config();
reference: https://www.npmjs.com/package/dotenv