title: How do I read and upload a large file to s3?
body: <p>I'm using Node.js .10.22 and <a href="https://github.com/kriskowal/q-io" rel="nofollow">q-fs</a></p>
  
  <p>I'm trying to upload objects to S3, which stopped working once the objects were over a certain MB size.</p>
  
  <p>Besides taking up all the memory on my machine, it gives me this error</p>
  
  <pre><code>RangeError: length &gt; kMaxLength
  at new Buffer (buffer.js:194:21)
  </code></pre>
  
  <p>When I try to use <code>fs.read</code> on the file.</p>
  
  <p>Normally, when this works, I do <code>s3.upload</code>, and put the buffer in the <code>Body</code> field.</p>
  
  <p>How do I handle large objects?</p>