Archive for Tag ‘redis‘

Controlling an EC2 instance with python

One of the selling points of EC2 is that it enables elastic provisioning of computing infrastructure; this allows following novel usage patterns where a server is used only for the time required to do some work.

The key to reach this flexibility is the API that gives developers the ability to startup a server, configure it, use it and shut it down. There are libraries for many programming languages but I like the way the boto python library makes it really simple do these things (and a lot more).

Here I’ll show how to use boto to start a server instance then how to send a file to the instance and execute a command on the remote server, and finally I’ll show how to terminate the instance.

Den Rest lesen…