I have a browser app that uses Polly and Lex Javascript SDK. I get this error error ConfigError: Missing region in config at Request.VALIDATE_REGION using this code
const awsPollyCredentials = {
accessKeyId: pollyKey,
secretAccessKey: pollySecret,
region: "us-east-1",
};
new AWS.Polly(awsPollyCredentials)
which is correct according the SDK docs. It is not finding the region. Why not?
NOTE: I cannot use an AWS global config because my Lex calls use different credentials in same page. So I need a solution that gets passed into AWS.Polly()
I gave up trying to get it to work with global credentials, even though the SDK docs says the Polly(options) accepts region. It only works in global AWS.config