@jambonz/speech-utils 0.0.27 → 0.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/get-aws-sts-token.js +8 -7
- package/package.json +1 -1
package/lib/get-aws-sts-token.js
CHANGED
|
@@ -14,13 +14,14 @@ async function getAwsAuthToken(
|
|
|
14
14
|
if (obj) return {...obj, servedFromCache: true};
|
|
15
15
|
|
|
16
16
|
/* access token not found in cache, so generate it using STS */
|
|
17
|
-
const stsClient = new STSClient({
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
const stsClient = new STSClient({
|
|
18
|
+
region: awsRegion,
|
|
19
|
+
credentials: {
|
|
20
|
+
accessKeyId: awsAccessKeyId,
|
|
21
|
+
secretAccessKey: awsSecretAccessKey,
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
const command = new GetSessionTokenCommand({DurationSeconds: EXPIRY});
|
|
24
25
|
const data = await stsClient.send(command);
|
|
25
26
|
|
|
26
27
|
const credentials = {
|