'Streaming files from AWS S3 with Node.js and SDK v3
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',
}),
);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
