cirlabs / django-project-template

A collection of development tasks and optimizations aimed at anyone doing news application development on tight deadlines in Django.
17 stars 10 forks source link

fabfile.py: Clear cloudfront cache with boto when pushing to production #73

Open aboutaaron opened 9 years ago

aboutaaron commented 9 years ago

Not sure how boto interacts with cloudfront, but basically we'll need cloudfront cache invalidation for the index.html file in the build when deployed.

aboutaaron commented 9 years ago

See: http://boto.readthedocs.org/en/latest/cloudfront_tut.html#invalidating-cloudfront-distribution-paths

It looks like we basically need to create a cloudfront obj, select the project/index.html path and send an invalidation request.

aboutaaron commented 9 years ago

Looks like boto doesn't support the latest Cloudfront API SMH: https://github.com/boto/boto/issues/1845

Unfortunately the CloudFront support in boto does not support the latest CloudFront API version. The core developer team is working on service updates like this one as time permits, but I cannot give you an exact date that it will be supported.