protected InputStream getBinaryRequestPayloadStream(SignableRequest<?> request) {
        if (SdkHttpUtils.usePayloadForQueryParameters(request)) {
            String encodedParameters = SdkHttpUtils.encodeParameters(request);
            if (encodedParameters == null)
                return new ByteArrayInputStream(new byte[0]);

            return new ByteArrayInputStream(
                    encodedParameters.getBytes(UTF8));
        }

        return getBinaryRequestPayloadStreamWithoutQueryParams(request);
    }
Returns the request's payload contents as binary data, without processing
any query string params (i.e. no form encoding for query params).

@param request
           The request
@return The request's payload contents as binary data, not including any
        form encoding of query string params.
aws-java-sdk-core/src/main/java/com/amazonaws/auth/AbstractAWSSigner.java