I configured .env file to have AWS credentials, it doesn't work.
in the docs, it is written the config will automatically be loaded from .env file. but it doesn't.
I tried to add the following
aws.config.update({
region: process.env.AWS_region,
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
});
and that worked.
any idea why AWS SDK doesn't load the options automatically?
"aws-sdk": "^2.288.0",
"dotenv": "^6.0.0",