Install & Compatibility
Where this runs
tested against v0.15.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.954s · 99.4MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 5.6s · import 0.916s · 100MB
99MB installed
● package 99MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
S3Storage
✓ from django_s3_storage.storage import S3Storage
✗ from django_s3_storage import S3Storage
S3Storage is in the storage submodule, not at the package root.
ManifestStaticS3Storage
✓ from django_s3_storage.storage import ManifestStaticS3Storage
✗ from django_s3_storage import ManifestStaticS3Storage
Also in storage submodule, not top-level.
Minimal configuration for S3 file and static storage.
import os
# settings.py
INSTALLED_APPS = [
'django_s3_storage',
...
]
AWS_REGION = 'us-east-1'
AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY_ID', '')
AWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY', '')
AWS_S3_BUCKET_NAME = 'my-bucket'
AWS_S3_BUCKET_AUTH = False
DEFAULT_FILE_STORAGE = 'django_s3_storage.storage.S3Storage'
STATICFILES_STORAGE = 'django_s3_storage.storage.ManifestStaticS3Storage'
Errors
Common errors & fixes
The 'django_s3_storage' package is not installed.
Missing dependency or incorrect Python environment.
fixRun: pip install django-s3-storage[boto3]
ModuleNotFoundError: No module named 'django_s3_storage'
The library is not installed or not in the current Python path.
fixInstall the package: pip install django-s3-storage
botocore.exceptions.NoCredentialsError: Unable to locate credentials
AWS credentials are not set in environment variables or settings.
fixSet AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables, or configure via AWS CLI.
django.core.exceptions.ImproperlyConfigured: Requested setting DEFAULT_FILE_STORAGE, but settings are not configured.
The storage backend setting is referenced before Django settings are fully loaded.
fixEnsure DEFAULT_FILE_STORAGE is defined in settings.py, not in a module-level variable that is evaluated early.
botocore.exceptions.ClientError: An error occurred (NoSuchBucket) when calling the PutObject operation: The specified bucket does not exist
The S3 bucket specified in AWS_S3_BUCKET_NAME does not exist.
fixCreate the bucket in AWS S3 console or via AWS CLI, then verify the bucket name is correct.
Upgrade
Version history
0.15.0latest on PyPI · released Nov 4, 2023
Audit
Dependencies
djangorequiredCore dependency; requires Django >= 3.2
boto3requiredRequired for S3 interaction