What is S3M?
S3M is a Laravel package that enables multipart uploads to AWS S3, allowing you to upload large files that exceed the standard 5GB single PUT request limit. It’s specifically designed for modern serverless environments where local filesystem storage is unreliable.Why S3M?
When running applications in serverless environments, you face unique challenges:Serverless Storage
You can never be sure that the same serverless container will be used on subsequent requests, making local filesystem storage unreliable.
5GB Upload Limit
AWS S3’s single PUT request has a 5GB limit. S3M splits large files into smaller parts and uploads them in parallel.
Direct Browser Uploads
Upload files directly from the browser to S3 without routing through your server, reducing server load and bandwidth costs.
Cloud-First Architecture
All files are stored in cloud storage (AWS S3) or shared filesystems (AWS EFS) from the start, following cloud-native best practices.
Key Features
Large File Support
Upload files that exceed the 5GB limit by automatically splitting them into smaller chunks.
Configurable Settings
Customize chunk size, parallel upload count, and retry attempts to match your needs.
How It Works
S3M implements the AWS S3 multipart upload protocol with a streamlined workflow:Use Cases
Serverless Applications
Serverless Applications
Perfect for Laravel applications deployed on AWS Lambda, Google Cloud Functions, or other serverless platforms where local storage is ephemeral.
Large Media Uploads
Large Media Uploads
Handle video files, high-resolution images, and large datasets that exceed standard upload limits.
Direct Client Uploads
Direct Client Uploads
Reduce server bandwidth and processing by allowing browsers to upload directly to S3.
Cloud-Native Architecture
Cloud-Native Architecture
Build applications that store all files in cloud storage from day one, avoiding migration challenges later.
S3M is inspired by Laravel Vapor and follows similar architecture patterns for file uploads.
What’s Next?
Installation
Install S3M via Composer and configure your environment
Quickstart
Get up and running with your first multipart upload