Saving an S3 buffer to file through AWS Javascript SDK

I'm using the AWS Javascript SDK to download a file from S3

var s3 = new AWS.S3();
var params = {
    Bucket: "MYBUCKET", 
    Key: file
   };
   s3.getObject(params, function(err, data) {
     if (err) console.log(err, err.stack); // an error occurred
     else {
        //code to save file from data's byte array here
     } 
   });

This feels like it should be easier than I'm making it out to be. Basically I want to trigger the native file download for the browser. Every resource I've found on the internet is for node's file system. I can't just use the file's URL to download as it is stored encrypted via KMS, so that is why I am going about it this way.

Thanks for the help!