Streaming multer storage engine for AWS S3. Current stable version is 3.0.1, which uses AWS SDK v3 (specifically @aws-sdk/client-s3 and @aws-sdk/lib-storage). The 2.x line used AWS SDK v2 and the s3.upload method. This package integrates Multer's storage engine with S3 for streaming file uploads, avoiding buffering to the filesystem. It supports configurable bucket, key generation, ACL, metadata, and exposes rich file info (size, location, etag, etc.). Release cadence is intermittent; maintenance is community-driven.
npm install multer-s3No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Set up an Express server with Multer and multer-s3 to upload a single file to S3, returning the file URL.
Update your AWS SDK to v3 and pass an S3Client (from @aws-sdk/client-s3) to the multerS3 constructor.
Always ensure you call `cb(null, key)` inside the key function. For async, use async/await and then call cb.
Use multer's middleware (e.g., `upload.single('file')`) and access `req.file` in the next handler.Remove stream options if upgrading from v2; the new SDK manages concurrency internally.
Use `file.location` for the S3 URL, `file.key` for the object key, and other multer-s3 specific fields.
Use `import { S3Client } from '@aws-sdk/client-s3'` and instantiate a new S3Client.Use `const multerS3 = require('multer-s3').default;` or use ES module import.