title: Actually Download File from S3 bucket to local machine
body: <p>I am trying to get an s3 file from my bucket using the following function:</p>
  
  <pre class="lang-js prettyprint-override"><code>async Export()
   {
     const myKey = '...key...'
     const mySecret = '...secret...'
    AWS.config.update(
      {
        accessKeyId: myKey,
        secretAccessKey: mySecret
      }
    );
  
    var s3 = new AWS.S3();
  
    s3.getObject({
      Bucket: '...bucket...',
      Key: '...filepath...'
    },
    function(error, data)
    {
      if (error != null)
      {
        alert("Failed to retrieve object: " + error)
      }
      else {
        alert("Loaded " + data.ContentLength + " bytes")
      }
    })
   }
  </code></pre>
  
  <p>and the message telling me that I have loaded a file of some number of bytes. However, the main goal is to get the file onto my local machine, would I need to have some sort of file stream going on here or something?</p>
  
  <h3>Notes</h3>
  
  <p>Using angular typescript not angular js</p>