Closed
Description
Is your feature request related to a problem? Please describe.
As a user, I want want to automatically refresh credentials in my service if it detects a change in credentials. Invoking fromIni()
will always return the same results, even if the ~/.aws/credentials
file has changed between invocations.
Describe the solution you'd like
I want to be able to retrieve current credentials, regardless of how many times I've invoked fromIni()
. This could be an extra { ignoreCache: true }
property that I can provide.
Describe alternatives you've considered
I've tried using @aws-sdk/shared-ini-file-loader
directly, and deleting the require / import but that apparently won't clear the const fileStatusHash: { [key: string]: FileStatus } = {};
object.
// Example, assume wrapped in a function
delete require.cache[require.resolve('@aws-sdk/shared-ini-file-loader')]
let loader = require('@aws-sdk/shared-ini-file-loader');
loader.loadSharedConfigFiles().then((p: any) => console.log(p.credentialsFile['default']))