NodeJS stream is one of the most powerful modules built-in. If you need to serve files on S3 through NodeJS service, a good idea is to leverage the compatibility of stream, especially if you want to serve big files.
One small trick here is you need to set up correct Content-Type before sending response back to the browser. Based on AWS’s documentation, https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Request.html, we can listen the event httpHeaders and set up the correct response header information.