node read file from s3 code example
Example: node js read file from s3 bucket
# This function for read/download file from s3 bucketconst s3download = function (params) { return new Promise((resolve, reject) => { s3.createBucket({ Bucket: BUCKET_NAME /* Put your bucket name */ }, function () { s3.getObject(params, function (err, data) { if (err) { reject(err); } else { console.log("Successfully dowloaded data from bucket"); resolve(data); } }); }); });}