Local and S3 are the two storage modes for File Stores. Each has trade-offs around cost, scalability, complexity, and feature richness. The right choice depends on your hosting model, expected file volumes, and security requirements.
Local storage
Files written to the web server's filesystem.
Pros
- Simpler — no AWS account needed, no cloud-storage SDK calls.
- Cheaper for small volumes — within your web server's existing disk allocation.
- No network latency — reads and writes are local filesystem operations.
- Easier to inspect during development — files are just there, on disk, can be examined with normal Unix tools.
Cons
- Doesn't scale across multiple web servers — each server has its own filesystem. A file on server A isn't visible to server B.
- Backup is your responsibility — no automatic replication. Filesystem snapshots and offsite backups are on you.
- Local disk is finite — limited by the server's storage capacity.
- Single-server failure means file loss if you haven't backed up.
S3 storage
Files written to AWS S3 or an S3-compatible service.
Pros
- Scales infinitely — no practical capacity limit.
- Built-in replication and durability — S3 stores multiple copies across availability zones automatically. AWS quotes 99.999999999% durability.
- Multi-server-friendly — every web server reads from the same bucket. Load balancing just works.
- Lifecycle policies — automatic transition to cheaper storage tiers (Glacier, Glacier Deep Archive) for old files.
- Native encryption — server-side encryption with AWS-managed or customer-managed keys.
- CDN integration — front the bucket with CloudFront for fast global delivery.
Cons
- Requires AWS account (or compatible service).
- Per-GB cost — typically $0.023/GB/month for standard tier. Plus per-request costs ($0.0004 per 1000 GET requests).
- Slight latency overhead — typically 20-100ms per S3 operation vs sub-millisecond local disk.
Recommendation
For production deployments and especially multi-server setups, use S3. The scalability and durability benefits massively outweigh the modest per-GB cost. For dev/staging or single-server installs that won't grow, local is fine and saves some operational overhead.
Migrating between modes
If you start with local and outgrow it, migrating to S3 is a one-time job:
- Set up the S3 bucket with the right policies.
- Sync the existing local files into the bucket (e.g. with
aws s3 sync). - Update the File Store configuration to switch from Local to S3.
- Verify file URLs still resolve correctly.
- After confirmation, optionally remove the local copies to free disk space.
Plan downtime for this — between the time you switch modes and the time files are accessible at their new locations, file links can break.
