Index: S3Constants.java =================================================================== --- S3Constants.java (revision 1617888) +++ S3Constants.java (working copy) @@ -66,6 +66,11 @@ * Amazon aws S3 region. */ public static final String S3_END_POINT = "s3EndPoint"; + + /** + * Constant for S3 Connector Protocol + */ + public static final String S3_CONN_PROTOCOL = "s3ConnProtocol"; /** * Constant to rename keys @@ -76,7 +81,7 @@ * Constant to rename keys */ public static final String S3_WRITE_THREADS = "writeThreads"; - + /** * private constructor so that class cannot initialized from outside. */ Index: Utils.java =================================================================== --- Utils.java (revision 1617888) +++ Utils.java (working copy) @@ -27,6 +27,7 @@ import org.slf4j.LoggerFactory; import com.amazonaws.ClientConfiguration; +import com.amazonaws.Protocol; import com.amazonaws.auth.AWSCredentials; import com.amazonaws.auth.BasicAWSCredentials; import com.amazonaws.services.s3.AmazonS3; @@ -67,6 +68,10 @@ int maxConnections = Integer.parseInt(prop.getProperty(S3Constants.S3_MAX_CONNS)); int maxErrorRetry = Integer.parseInt(prop.getProperty(S3Constants.S3_MAX_ERR_RETRY)); ClientConfiguration cc = new ClientConfiguration(); + String protocol = prop.getProperty(S3Constants.S3_CONN_PROTOCOL); + if ( protocol != null && protocol.equalsIgnoreCase("http")) { + cc.setProtocol(Protocol.HTTP); + } cc.setConnectionTimeout(connectionTimeOut); cc.setSocketTimeout(socketTimeOut); cc.setMaxConnections(maxConnections);