in cloudwatch-lambda/src/main/java/com/amazonwebservices/blogs/containers/sigv4/AWS4SignerBase.java [142:157]
protected static String getCanonicalizedResourcePath(URL endpoint) {
if ( endpoint == null ) {
return "/";
}
String path = endpoint.getPath();
if ( path == null || path.isEmpty() ) {
return "/";
}
String encodedPath = HttpUtils.urlEncode(path, true);
if (encodedPath.startsWith("/")) {
return encodedPath;
} else {
return "/".concat(encodedPath);
}
}