Can someone explain how to fix a missing config error with Node.js? I\'ve followed all the examples from the aws doc page but I still get this error no matter what.
You can resolve this issue right in your project directory.
npm i -D dotenv
..env
file in root of our project.AWS_SDK_LOAD_CONFIG=1
in that .env
file.const {config} = require("dotenv");
in the same file where you configure connection to DynamoDB.config()
before you new AWS.DynamoDB()
.P.S. As someone have mentioned before, problem is that Node doesn't get data from your aws.config file