accept aws polly without credential

This commit is contained in:
Quan HL
2024-04-22 20:02:59 +07:00
parent b4aad7991b
commit 3de8e5ff57
2 changed files with 3 additions and 2 deletions

View File

@@ -112,7 +112,7 @@ const getAwsVoices = async(_client, logger, credentials) => {
credentials: assumedRoleCreds,
});
} else {
throw new Error('Missing Polly credential');
client = new PollyClient();
}
const command = new DescribeVoicesCommand({});
const response = await client.send(command);

View File

@@ -288,7 +288,8 @@ const synthPolly = async(logger, {credentials, stats, language, voice, engine, t
credentials: assumedRoleCreds,
});
} else {
throw new Error('Missing Polly credential');
// AWS RoleArn assigned to Instance profile
polly = new PollyClient();
}
const opts = {
Engine: engine,