title: Read and parse CSV file in S3 without downloading the entire file
body: <p>Using node.js, with the intention of running this module as an AWS Lambda function.</p>
  
  <p>Using <code>s3.getObject()</code> from <code>aws-sdk</code>, I am able to successfully pick up a very large CSV file from Amazon S3. The intention is to read each line in the file and emit an event with the body of each line.</p>
  
  <p>In all examples I could find, it looks like the entire CSV file in S3 has to be buffered or streamed, converted to a string and then read line by line.</p>
  
  <pre><code>s3.getObject(params, function(err, data) {
     var body = data.Body.toString('utf-8');
  }
  </code></pre>
  
  <p>This operation takes a very long time, given the size of the source CSV file. Also, the CSV rows are of varying length, and I'm not certain if I can use the buffer size as an option.</p>
  
  <p><strong>Question</strong></p>
  
  <p>Is there a way to pick up the S3 file in node.js and read/transform it line by line, which avoids stringifying the entire file in memory first?</p>
  
  <p>Ideally, I'd prefer to use the better capabilities of <code>fast-csv</code> and/or <code>node-csv</code>, instead of looping manually.</p>