exports.create = function()

in lib/post-es.js [59:77]


exports.create = function(target, options) {
  var index = target.destination.indexOf('#');
  if(index != -1) {
    var endpoint = target.destination.substr(0, index);
    var destination = target.destination.substr(index+1);
    target.endpoint = endpoint;
    target.destination = destination;
  }
  var service = {
    region: options.region,
    endpoint: new AWS.Endpoint(target.endpoint),
    path: target.destination,
    credentials: (options.credentials ? options.credentials : new AWS.EnvironmentCredentials('AWS'))
  };
  if(config.debug) {
    console.log("Created new Amazon Elasticsearch Service instance");
  }
  return service;
};