in lib/sigv4-auth-provider.js [37:56]
function SigV4AuthProvider( {
region,
accessKeyId,
secretAccessKey,
sessionToken} = {}) {
if (accessKeyId) {
const credentials = new AWS.Credentials(accessKeyId, secretAccessKey, sessionToken);
this.chain = new AWS.CredentialProviderChain([credentials]);
} else {
this.chain = new AWS.CredentialProviderChain();
}
this.region = region || SigV4AuthProvider.getRegionFromEnv();
// validate region
if (!this.region) {
throw new Error('[SIGV4_MISSING_REGION] No region provided. You must either provide a region or set '
+ 'environment variable [AWS_REGION]');
}
}