Using the AWS Ruby SDK to launch and tag AWS EC2 Spot Requests

Amazon Web Services provide a number of SDKs that support the various scripting languages. Because we love to automate manual repetitive tasks, we utilized the Ruby AWS SDK to develop a script that: –

1. Creates a specified number of spot instance requests with associated launch parameters
2. Spreads the launch requests over a specified number range of launch zones
3. Waits for the instances to be fulfilled and informs you
4. Tags the instances with your tagname so they appear with a visible description in the web portal name

This is a working version but feel free to enhance to parameterise obvious variables
Continue reading