Python in the Amazon cloud

Posted by Nick on 12/30/2010 filed in Linux, Programming, Python

I have a couple ideas rolling around in my head, and recently I decided to take advantage of Amazon’s AWS service since they are offering a “free” tier. (Basically its free if you are below certain generous limits on resource utilization.) Since python is my weapon of choice these days, I set about to figure out how to get python up and running on an EC2 instance.

If you are going to go down the Linux route with AWS (and honestly why wouldn’t you?), then you are in luck since python ships on most modern distributions. But, while python is “batteries included” there are some really nice projects out there that it is good to take advantage of. Installing these projects is where you start to find out there are differences in the EC2 AMI’s.

My first attempt was with the default Amazon AMI. It seemed like a good choice, but the more I played with it, the more I realized that it was pretty bare-bones. easy_install is included, but when running it to try and install something you run into permissions problems.

Because this is supposed to be a nice experiment, I only played around with it for a hour or so. My patience exhausted, I went looking for an alternative and ran right into the perfect match: ActiveState has an AMI specifically for python developers

This is awesome because ActiveState puts out a really nice Windows package for Python (and other lesser languages). I fired up their AMI instance and have found it to be really nice. I put my python project out there earlier this month and it ran without a problem… until the code crashed because I forgot to put a try catch block in place. :)

Seriously though, I really like this AMI. Not only is a nice python distribution there, but they also included gcc so if you need to compile something, you don’t have to go far. The easy_install script runs like a dream, and I haven’t had any problems with it at all. In fact, my whole experiment (which seems to getting attention mostly from blog aggregators at the moment) has only cost me a total of $0.19. Yes, only 19 cents! And 1 cent of that was from the ActiveState Python AMI (the other 18 cents was from my playing around with the Amazon AMI that wasn’t that great).

Now to get back to my ideas, and sling some python code out into the cloud…


One Response to “Python in the Amazon cloud”

  1. Tweets that mention Python in the Amazon cloud | Possibility and Probability -- Topsy.com Says:

    [...] This post was mentioned on Twitter by The Cloud Network . The Cloud Network said: #Amazon #Cloud Python in the Amazon cloud | Possibility and Probability: I have a couple ideas rolling arou… http://bit.ly/g2EmM6 #TCN [...]