code: function(string) {
              var output = encodeURIComponent(string);
              output = output.replace(/[^A-Za-z0-9_.~\-%]+/g, escape);
              output = output.replace(/[*]/g, function(ch) {
                  return "%" + ch.charCodeAt(0).toString(16).toUpperCase();
              });
              return output;
          }
docs: Escapes url part as for AWS requirements
  AWS uriEscapePath function pulled from aws-sdk-js licensed under Apache 2.0 - http://github.com/aws/aws-sdk-js