title: Download a file from AWS-S3 to local computer file system
body: <p>I have written microservice using api-gateway, aws-lambda and s3 bucket.
  I am currently able to read all file content in lambda function.
  But I want to download the the file from s3 to local file system .
  I tried using pipe(localfilepath) but it throws error about the path(not found).</p>
  
  <pre><code>const AWS = require('aws-sdk'); 
  var s3 = new AWS.S3();
  exports.handler = function(event, context, callback) {
      var params = {
        "Bucket": "bucketname",
        "Key": "hello"
          };
  
      var readstream = s3.getObject(params).createReadStream();
      readstream.on('data',(data) =&gt; {
      console.log(data)
      })
      .on('end', () =&gt; {
        return callback(null, "file read done")
      })
      .on('error',(e) =&gt; {
        console.log("Error occured",e)
      })
  };
  </code></pre>
  
  <p>How can I download the file to users file system?</p>