title: How can I use putObject to upload a csv file to AWS S3 from Nodejs?
body: <p>I tried to directly upload the file stream as a parameter, but it didn't work.</p>
  
  <pre><code>var param = {
      Bucket: 'sql-dev',
      Key: 'Report',
      Body: new Buffer(fs.createWriteStream('./temp/ALL.csv'))
  };  
  s3bucket.putObject(param, function(err, data){
      if(err) console.log(err);
      else console.log(data);
  });
  </code></pre>
  
  <p>How do I use that?</p>