Storing Files on Amazon S3¶
If you’re using containers for deployment (including Docker and Heroku) you’ll want to avoid storing files in the container’s volatile filesystem. This integration allows you to delegate storing such files to Amazon’s S3 service.
Set the following environment variables to use S3 to store and serve media files:
- Your AWS access key.
- Your AWS secret access key.
- The S3 bucket name to use for media files.
By default static files (such as CSS and JS files required to display your pages) will be served by the application server.
If you intend to use S3 for your static files as well, set an additional environment variable:
- The S3 bucket name to use for static files.