AWS SDK for javascript assumerole with proxy

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

Also in JavaScript: