aws / aws-sdk-js

AWS SDK for JavaScript in the browser and Node.js
https://aws.amazon.com/developer/language/javascript/
Apache License 2.0
7.59k stars 1.55k forks source link

sslEnabled option in Polly constructor #1764

Closed shri3k closed 6 years ago

shri3k commented 6 years ago

I've been following this document and based on that document it seems like I can pass all the options that's mentioned where sslEnabled happens to be one of them.

I went ahead and created a simple program to test the options which is

require('dotenv-safe').load(); // aws keys in .env file

const aws = require('aws-sdk');

const Polly = new aws.Polly({
  apiVersion: '2016-06-10',
  sslEnabled: false,
  logger: console
});

Polly.describeVoices(function(err, data){
  if(err) {
    console.error(err);
    process.exit(1);
  }
  console.log(data);
});

but I keep getting the following error

AWS polly undefined 0.541s 3 retries] describeVoices({})
{ Error: connect ECONNREFUSED 52.94.208.193:80
    at Object._errnoException (util.js:1026:11)
    at _exceptionWithHostPort (util.js:1049:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1174:14)
  message: 'connect ECONNREFUSED 52.94.208.193:80',
  code: 'NetworkingError',
  errno: 'ECONNREFUSED',
  syscall: 'connect',
  address: '52.94.208.193',
  port: 80,
  region: 'us-west-2',
  hostname: 'polly.us-west-2.amazonaws.com',
  retryable: true,
  time: 2017-10-19T00:44:47.479Z }

It works wonderfully if I switch sslEnabled to true however. I don't know if that service requires us to use https or if I'm missing something.

I guess what my real question is - is it possible to request polly service in http? I apologize if it's a noob question.

chrisradek commented 6 years ago

@shri3k Most services will only support https. There is a full list of which services support which protocols here: http://docs.aws.amazon.com/general/latest/gr/rande.html

Note that Polly only supports HTTPS according to the table.

shri3k commented 6 years ago

@chrisradek Thank you for providing that list. :)

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.