KoteiIto / node-athena

a nodejs simple aws athena client
MIT License
105 stars 73 forks source link

Proxy #29

Closed jesperalmstrom closed 5 years ago

jesperalmstrom commented 6 years ago

Is there any way to get support for proxy? https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/node-configuring-proxies.html

KoteiIto commented 5 years ago

Please create a client like below and try it.

const proxy = require('proxy-agent');

const client = athena.createClient({
    bucketUri: 'xxx',
},{
    region: 'xxx',
    httpOptions: { 
        agent: proxy('xxx')
    }
})
client.execute("select 1", (err, result) => console.log(result.records))