code: public InputStream getInputStream(String bucketName, String key)
              throws AmazonServiceException, AmazonClientException, InterruptedException, IOException {
          Supplier<File> tempFileSupplier = ExceptionSoftener.softenSupplier(() -> Files.createTempFile(FileSystems.getDefault()
                                                                                                                   .getPath(tmpDirectory),
                                                                                                        "micro-s3",
                                                                                                        "file")
                                                                                        .toFile());
          return getInputStream(bucketName, key, tempFileSupplier);
      }
docs: Method returns InputStream from S3Object. Multi-part download is used to
  get file. s3.tmp.dir property used to store temporary files.
  
  @param bucketName
  @param key
  @return
  @throws AmazonServiceException
  @throws AmazonClientException
  @throws InterruptedException
  @throws IOException