django-s3-storage
Django Amazon S3 file storage.
What it is and what it does
django-s3-storage is a Django file storage backend that integrates Amazon S3 as the storage layer for both media files and static files. It sits between Django's file operations and boto3, translating Django's storage API calls into S3 operations. The package handles authentication via AWS credentials, URL generation with optional signed URLs, content encoding (gzip), server-side encryption (AES256 or KMS), and metadata management. It provides two main storage classes: S3Storage for regular media files and StaticS3Storage or ManifestStaticS3Storage for static assets.
You configure it through Django settings (bucket name, region, authentication, caching behavior) and optionally per-field in model definitions. It supports both private files (authenticated URLs) and public files (direct S3 URLs), making it suitable for applications that need to offload file storage to S3 while keeping the Django ORM and file field API unchanged.
Use it for:
- Store user-uploaded media files (images, documents) in S3 instead of the application server's filesystem.
- Serve Django static files (CSS, JavaScript) from S3 with aggressive caching and optional CDN integration.
- Implement private file access with time-limited signed URLs for confidential documents.
- Enable horizontal scaling by removing filesystem dependencies from application servers.
- Configure per-bucket encryption and metadata policies for compliance or performance tuning.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Django file storage backends that read from and write to Amazon S3, handling both regular media files and static files with configurable authentication, caching, and encryption.
Yes, if you are running Django on AWS and need S3 file storage. The package is stable, has no vulnerabilities, and low install friction. However, maintenance is dormant (last release over a year ago), so verify compatibility with your specific Django and Python versions before adopting. For new projects, consider whether an actively maintained alternative better suits your timeline.
Install
django-s3-storage on PyPI
pip
pip install django-s3-storageuv
uv add django-s3-storagepoetry
poetry add django-s3-storageInstalling django-s3-storage
Before you install
Low install friction with a pure-Python wheel. Maintenance is dormant—last release was over a year ago (2023-11-04) and last commit in September 2024—but the package remains stable and has no known vulnerabilities.
License in practice
BSD license is permissive, allowing commercial and private use with minimal restrictions.
Quickstart
pip install django-s3-storage
# In settings.py:
INSTALLED_APPS = ['django_s3_storage']
DEFAULT_FILE_STORAGE = 'django_s3_storage.storage.S3Storage'
AWS_S3_BUCKET_NAME = 'your-bucket'
AWS_REGION = 'us-east-1'
# In models.py:
from django.db import models
class MyModel(models.Model):
file = models.FileField()
Requires AWS credentials (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY) and an existing S3 bucket to be configured before use.
Verify before relying
- Whether the package supports Django versions beyond 4.1 (classifiers list only up to 4.1).
- Whether Python 3.11+ is supported despite classifiers only listing up to 3.10.
- Current compatibility with modern boto3 versions and any breaking changes.
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — django, boto3 |
| Maintenance | dormant — 1,014 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 103,082/month — #12,831 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_s3_storage-0.15.0-py3-none-any.whl
Tags
More Dynamic Content packages
MarkupSafe provides a text object that escapes…
permissive · top 100 on PyPI
Jinja2Jinja2 is a templating engine that renders…
permissive · top 100 on PyPI
soupsieveSoupsieve is a CSS selector library designed to…
permissive · top 100 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
FlaskFlask is a lightweight WSGI web application…
permissive · top 1,000 on PyPI
MakoMako compiles Python-embedded templates into…
permissive · top 1,000 on PyPI
synapse-s3-storage-providerA Synapse media storage provider that…
permissive · top 15,000 on PyPI
django-cloudinary-storageIntegrates Django with Cloudinary to serve…
permissive · top 15,000 on PyPI
django-dbbackupProvides Django management commands to backup…
permissive · top 15,000 on PyPI
CollectfastaCollectfasta speeds up Django's collectstatic…
permissive · top 5,000 on PyPI
s3cmds3cmd is a command-line tool for uploading,…
copyleft · top 5,000 on PyPI
dvc-s3Enables DVC to read from, write to, and manage…
permissive · top 5,000 on PyPI
CollectfastCollectfast accelerates Django's collectstatic…
permissive · top 15,000 on PyPI
s3fss3fs provides a Python filesystem interface to…
permissive · top 100 on PyPI
fs-s3fsS3FS provides a PyFilesystem interface to…
permissive · top 15,000 on PyPI
s3urlsParse and build Amazon S3 URLs in multiple…
permissive · top 15,000 on PyPI