I recently had to upgrade to aws-java-sdk 1.11.108. I have a java program that downloads s3 objects (8 to 10 GB in size) to EC2 box and process it as a stream. This program has had been working for over 2 years w/o any problems, but after updating to the latest version of aws-java-sdk my file-download aborts midway with the following WARN message in the logs (no exception)
WARN:com.amazonaws.services.s3.internal.S3AbortableInputStream - Not all bytes were read from the S3ObjectInputStream, aborting HTTP connection. This is likely an error and may result in sub-optimal behavior. Request only the bytes you need via a ranged GET or drain the input stream after use.
S3Object s3Obj = s3client.getObject(new GetObjectRequest(bucketName, s3FileName));
Reader reader = new BufferedReader(new InputStreamReader(new GZIPInputStream(s3Obj.getObjectContent());
I will appreciate if somebody can tell why the stream is aborting silently w/o throwing any exception, and what is the best way to make it work.
Thanks