mirror of
https://github.com/jambonz/speech-utils.git
synced 2026-07-23 12:41:48 +00:00
fix issue with conflicting EC2 permissions calling AWS STS
This commit is contained in:
@@ -14,13 +14,14 @@ async function getAwsAuthToken(
|
||||
if (obj) return {...obj, servedFromCache: true};
|
||||
|
||||
/* access token not found in cache, so generate it using STS */
|
||||
const stsClient = new STSClient({ region: awsRegion });
|
||||
const params = {
|
||||
accessKeyId: awsAccessKeyId,
|
||||
secretAccessKey: awsSecretAccessKey,
|
||||
DurationSeconds: EXPIRY
|
||||
};
|
||||
const command = new GetSessionTokenCommand(params);
|
||||
const stsClient = new STSClient({
|
||||
region: awsRegion,
|
||||
credentials: {
|
||||
accessKeyId: awsAccessKeyId,
|
||||
secretAccessKey: awsSecretAccessKey,
|
||||
}
|
||||
});
|
||||
const command = new GetSessionTokenCommand({DurationSeconds: EXPIRY});
|
||||
const data = await stsClient.send(command);
|
||||
|
||||
const credentials = {
|
||||
|
||||
Reference in New Issue
Block a user