var AWS = require('aws-sdk'); var LineStream = require('byline').LineStream; var ls = new LineStream(); var s3 = new AWS.S3(); var params = { Bucket: "bucket", Key: "key" } var s3s = s3.getObject(params).createReadStream(); s3s.setEncoding('utf-8'); s3s.pipe(ls).on('data', function(line) { // }); s3s.on('end', function() { // });