docs: function getInstanceIp() {
          return new Promise(function(resolve, reject) {
              debug('Requesting IP address information from EC2');
              http.get('http://169.254.169.254/latest/meta-data/public-ipv4/', function(res) {
                  const statusCode = res.statusCode;
                  if(statusCode !== 200) {
                      debug('Error requesting IP from EC2! ' + statusCode);
                      res.resume();
                      return reject();
                  }
                  res.setEncoding('utf-8');
                  var body = '';
                  res.on('data', function(data) { body += data });
                  res.on('end', function() {
                      config.endpoint = 'http://' + body;
                      debug('setting endpoint to: ' + config.endpoint);
                      return resolve(config.endpoint);
                  });
              }).on('error', function(err) {
                  debug('Error requesting IP from EC2! ' + err.message);
                  return reject();
              });
          });
      }