|
function getCredentialChainCreds() { |
|
let chain = new AWS.CredentialProviderChain(); |
|
|
|
let result; |
|
chain.resolve((err, c) => { |
|
result = c; |
|
}); |
|
|
|
return result; |
|
}; |
this function will always return undefined because
chain.resolve(...)
is async and the callback will not run until after getCredentialChainCreds returns