javascript v3 sdk s3.GetObjectCommand download stream

0

In the new v3 javascript sdk, how does streaming download of an s3 object work? I used to use getObject(params).createReadStream().pipe(out), but createReadStream is not defined here:
s3.send(new GetObjectCommand(params)).createReadStream();

asked 2 years ago1009 views
1 Answer
0

This answers it:
https://github.com/aws/aws-sdk-js-v3/issues/1096

the returned property, Body, is a streamable, so response.Body.pipe(createWriteStream(fileName));

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions