aws4.js
function encodeRfc3986(urlEncodedString) {
  return urlEncodedString.replace(/[!'()*]/g, function(c) {
    return '%' + c.charCodeAt(0).toString(16).toUpperCase()
  })
}
function encodeRfc3986(urlEncodedString) {
  return urlEncodedString.replace(/[!'()*]/g, function(c) {
    return '%' + c.charCodeAt(0).toString(16).toUpperCase()
  })
}
function encodeRfc3986 ( urlEncodedString ) { return urlEncodedString . replace ( / [!'()*] / g , function ( c ) { return '%' + c . charCodeAt ( 0 ) . toString ( 16 ) . toUpperCase ( ) } ) }
This function assumes the string has already been percent encoded
This function assumes the string has already been percent encoded