Created: 2012-03-20 20:13
Updated: 2013-10-20 21:57

Django CloudFront

Django Cloudfront is a django cache backend that uses AWS Cloudfront (an AWS integrated CDN) as a backend.

Warning: Early stages of development.

Recently AWS announced they were reducing the minimum TTL for Cloudfront. This makes CloudFront suitable to be an arbitrary, industrial strength caching mechanism. Creating a new caching backend means Django apps that use the built-in caching framework will be able to use CloudFront without further modification to Django apps.


  • Boto: A Python interface to AWS.
  • Django: The Python-based web framework for which this cache plugin is made, thus, the point.
  • wsgiref: The reference implementation of the WSGI standard.

Required Settings

  • CLOUDFRONT_BUCKET: The name of the AWS CloudFront bucket to use.
  • AWS_ACCESS_KEY_ID: The access key id for your AWS account.
  • AWS_SECRET_ACCESS_KEY: The secret access key for your AWS account.


First set up AWS CloudFront. Have a look at the AWS Documentation. Make sure you have set the required settings (above) appropriately.

In, set your cache backend like so:

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more