Latest recipes tagged "amazon" Code RecipesScript for cache invalidation at Amazon CloudFront (Python) 2011-07-05T14:40:58-07:00Andrey Nikishaev <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: 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="" rel="nofollow"></a> so dir_prefix will be '/social/data/'</p> Converting MySQL database to an Amazon Simple DB database (Python) 2008-10-31T11:55:16-07:00Chris McAvoy <p style="color: grey"> Python recipe 576548 by <a href="/recipes/users/4167739/">Chris McAvoy</a> (<a href="/recipes/tags/amazon/">amazon</a>, <a href="/recipes/tags/database/">database</a>, <a href="/recipes/tags/mysql/">mysql</a>, <a href="/recipes/tags/simpledb/">simpledb</a>). </p> <p>This script will take all the tables from a given MySQL database and upload them to Amazon SimpleDB as Domains. The 'name' of each uploaded record is the value of the first primary key found in the table.</p> <p>This was written to scratch a particular itch, I've tested it against a 500mb database of my own, but didn't try overly hard to make it an all purpose general tool.</p>