2

I would like to stream a file with the AWS Node.js SDK v3 without downloading it completely first. How to get this stream? In the documentation I only found examples for the complete download, which works, but I don't want it.

import { S3Client, GetObjectCommand } from '@aws-sdk/client-s3';

const bareBonesS3 = new S3Client({ region: 'eu-central-1' });
const file = await bareBonesS3.send(
  new GetObjectCommand({
    Bucket: 'SOME_BUCKET_NAME',
    Key: 'SOME_OBJECT_KEY',
  }),
);
user1791139
  • 606
  • 1
  • 11
  • 27
  • 1
    Does this answer your question? [AWS s3 V3 Javascript SDK stream file from bucket (GetObjectCommand)](https://stackoverflow.com/questions/67366381/aws-s3-v3-javascript-sdk-stream-file-from-bucket-getobjectcommand) – jarmod Feb 10 '22 at 14:26
  • Awesome @jarmod ! TY :) – user1791139 Feb 11 '22 at 07:39

0 Answers0