S3 Egg Uploader

If you've been dealing with Python and EC2, chances are you've dealt with Boto, and that you've often had the need to push a custom EGG into S3 for private distribution. Typically this involves a long laborious process of bundling as an egg, then pushing to s3, then granting permissions to any external users you need to (in my case I need to grant permission to a dev and production account for READ access).

Lucky for me, the SetupTools library allows you to extend SetupTools with your own custom commands! I've created a nifty little utility called S3EggUploader, which allows you to bundle, push, and grant permissions all in one easy command:


python setup.py s3_upload -bmy-bucket -gmyaccount@gmail.com,myotheraccount@gmail.com


The above command would bundle and upload your egg to your account under my-bucket, and then grant READ access to myaccount@gmail.com AND myotheraccount@gmail.com automatically. You can also make it all public by passing in "-public" to the command line.

This simple utility saves me hours out of every day when you look at it. I no longer have to worry about writing my custom Makefiles for every new module I make just to simplify the process of bundling and sharing among my accounts!

Comments