code: public static String getVersion1SignedRequest(String              uri,
                                                    Map<String, String> params,
                                                    String              awsAccessKeyId,
                                                    String              awsSecretKey)
             throws SignatureException {
          if ((params == null)         ||
              (awsAccessKeyId == null) ||
              (awsSecretKey == null)   ||
              (uri == null)) {
              throw new IllegalArgumentException("Null parameter passed in");
          }
  
          params.put("AWSAccessKeyId", awsAccessKeyId);
          params.put("SignatureVersion", "1");
          params.put("Timestamp", getTimestamp());
  
          String stringToSign = getV1StringToSign(params);
          String signature = createV1Signature(stringToSign,
                                               awsSecretKey,
                                               HMAC_SHA1_ALGORITHM);
          params.put("Signature", signature);
  
  
          // Encode the query parameter values and construct the
          // query string.
          StringBuffer queryString = new StringBuffer();
          for (Map.Entry<String, String> entry : params.entrySet()) {
              String value = entry.getValue();
              String encValue;
  
              try {
                  encValue = URLEncoder.encode(value, UTF8_CHARSET);
              } catch (UnsupportedEncodingException e) {
                  encValue = value;
              }
  
              String separator = (queryString.length() == 0) ? "?" : "&";
              queryString.append(separator);
              queryString.append(entry.getKey() + "=" + encValue);
          }
  
          return uri + queryString.toString();
      }
docs: Creates a "SignatureVersion 1" based signed request. The requestURI
  parameter includes the <protocol>://<endpoint>/<uri> in it. This
  method will ONLY add "Timestamp", "AWSAccessKeyId", "SignatureVersion"
  and "Signature" parameters. It's the callers responsibility to include
  other parameters in the params map. The other parameters will be specific
  to the the REST API that is being invoked. So, the caller should include
  parameters such as "Action", etc.
  
  @param uri                format will <protocol>://<endpoint>/<resource>
  @param params             Map with parameters such as "Action", etc.
  @param awsAccessKeyId     AccessKeyId of the caller to create a signature
  @param awsSecretKey       SecretKey of the caller to create the signature
  @return String that is a completely signed URL based on
  "SignatureVersion 1" scheme
  @throws java.security.SignatureException