title: possible to update a file (csv preferably) with node aws-sdk?
body: <p>I understand how to read a file, but I'm not sure how to create a stream to update the file. Essentially, I want to run the following on an s3 object: </p>
  
  <p><code>fs.writeFileSync('targetFile.csv', new_data, {flag: 'a+'})</code></p>
  
  <p>The context is, I have an elastic beanstalk app containing a form. On submit, I want to capture some of the data and write to file csv file that lives in a s3 bucket. If there's a better way solution, I'm open to that.</p>
  
  <p>UPDATE:
  Here's my solution, but I feel there should be a cleaner way:</p>
  
  <pre><code>const params = {
      Bucket: 'BUCKET',
      Key: 'file.csv',
    }
    s3.getObject(params, function(err, data){
      if (err) console.log(err, err.stack);
      else {
        // since I'm adding to csv: add a new line and comma-seperate new values
        params.Body = data.Body.toString('utf-8') + '\n additionanal cell1, additional cell2, additionalcell3'; 
        s3.putObject(params, function(err, data) {
          if (err) console.log(err, err.stack);
          else console.log(data);
        });
      }
    })
  </code></pre>