Menu
AWS SDK for JavaScript
Developer Guide for SDK v2.153.0

Configuring Proxies for Node.js

If you can't directly connect to the internet, the SDK for JavaScript supports use of HTTP or HTTPS proxies through a third-party HTTP agent, such as proxy-agent. To install proxy-agent, type the following at the command line.

Copy
npm install proxy-agent --save

To use this proxy in your application, you must set the httpOptions property of AWS.Config as follows.

Copy
var proxy = require('proxy-agent'); AWS.config.update({ httpOptions: { agent: proxy('http://internal.proxy.com') } });

For more information about other proxy libraries, see npm, the Node.js package manager.