Top-rated recipes tagged "cloudfront"http://code.activestate.com/recipes/tags/cloudfront/top/2011-07-05T14:40:58-07:00ActiveState Code RecipesScript for cache invalidation at Amazon CloudFront (Python) 2011-07-05T14:40:58-07:00Andrey Nikishaevhttp://code.activestate.com/recipes/users/4176176/http://code.activestate.com/recipes/577779-script-for-cache-invalidation-at-amazon-cloudfront/ <p style="color: grey"> Python recipe 577779 by <a href="/recipes/users/4176176/">Andrey Nikishaev</a> (<a href="/recipes/tags/amazon/">amazon</a>, <a href="/recipes/tags/cloudfront/">cloudfront</a>). </p> <p>This script scans directories that was uploaded to CloudFront and build files index. When you modify some files, script automatically see what files was modified since the last update, and clear cache on CloudFront only for them.</p> <p>Usage: script.py data_dir [index_file] [dir_prefix] </p> <p>data_dir - path to directory with uploaded data</p> <p>index_file - path to files index</p> <p>dir_prefix - needed if you data_dir path is different from url at CloudFront.For example: Your data_dir is '/data' but url at CloudFront is <a href="http://url.com/social/data/" rel="nofollow">http://url.com/social/data/</a> so dir_prefix will be '/social/data/'</p>