title: Reading stream from AWS S3 involves loading entire file
body: <p>The short version of my scenario is that I am reading a file stored in Amazon's S3 with the .NET SDK...</p>
  
  <pre><code>GetObjectRequest request = new GetObjectRequest
  {
      BucketName = this.m_bucketName,
      Key = GetFileKey(fileIdentifier),
  };
  
  IAmazonS3 source = ...
  GetObjectResponse response = await source.GetObjectAsync(request);
  return response.ResponseStream;
  </code></pre>
  
  <p>I then pass this stream through to MVC as a <code>File</code> result</p>
  
  <pre><code>public async Task&lt;FileResult&gt; Download(...)
  {
     return File(GetAwsStream(...), ...);
  }
  </code></pre>
  
  <p><strong>The problem is</strong>, apparently S3 is eagerly calculating a checksum of the entire file before returning anything.  For large files, this is a significant issue because </p>
  
  <ul>
  <li>the web server must download the entire file from AWS S3 before a single byte can start streaming to the client; for large files, it can take minutes before the web server responds to the client</li>
  <li>it uses a ton of memory on the web server to read the entire stream and calculate the checksum</li>
  </ul>
  
  <p>This entirely defeats the point of a stream.  Is there any way to get an actual "stream" from S3?</p>