javascript v3 sdk s3.GetObjectCommand download stream


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

This answers it:

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