Popular recipes tagged "amazon"http://code.activestate.com/recipes/tags/amazon/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>
Converting MySQL database to an Amazon Simple DB database (Python)
2008-10-31T11:55:16-07:00Chris McAvoyhttp://code.activestate.com/recipes/users/4167739/http://code.activestate.com/recipes/576548-converting-mysql-database-to-an-amazon-simple-db-d/
<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>