I have a typescript/node-based application where the following line of code is throwing an error:
const res = await s3.getObject(obj).promise();
The error I'm getting in terminal output is:
❌ Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1
CredentialsError: Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1
However, I do actually have a credentials file in my .aws directory with values for aws_access_key_id
and aws_secret_access_key
. I have also exported the values for these with the variables AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
. I have also tried this with and without running export AWS_SDK_LOAD_CONFIG=1
but to no avail (same error message). Would anyone be able to provide any possible causes/suggestions for further troubleshooting?