title: Get an S3Object InputStream from a GetObjectResponse in AWS Java SDK 2 Using S3AsyncClient?
body: <p><strong>How can a plain <code>InputStream</code> be created using the S3AsyncClient for a getObject request?</strong></p>
  <p>The <a href="https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/s3/S3AsyncClient.html" rel="nofollow noreferrer">S3AsyncClient</a> for AWS JDK 2.0 does not seem to have a function that returns a <code>ResponseInputStream&lt;GetObjectResponse&gt;</code> the same way that the S3Client synchronous client does.</p>
  <p>The only return type available is a <code>CompletableFuture&lt;GetObjectResponse&gt;</code>, but the methods returning that type assume that the data is going to a local path.</p>
  <pre><code>S3AsyncClient s3AsyncClient = ...;
  
  
  CompletableFuture&lt;GetObjectResponse&gt; response = s3AsyncClient.getObject(
      GetObjectRequest.builder()
              .bucket(bucket)
              .key(key)
              .build(),
      path));    
  </code></pre>
  <p>There is <a href="https://stackoverflow.com/questions/54447306/get-an-s3object-from-a-getobjectresponse-in-aws-java-sdk-2-0">a similar stackoverflow item</a>, but the question and answer both utilize the synchronous S3Client.</p>
  <p>Thank you in advance for your consideration and response.</p>