How do you configure Amazon EC2 auto-scaling to create instances programmatically based on a database event?
I have an application that processes several dozen large files (100MB each) on a monthly basis. Currently, once a month I'll manually create an instance per file, and then run a shell script to kick off the processing task on each instance and kill the instances once all processing is complete.
I want to automate this by configuring an EC2 auto-scale group to launch a new instance when a new database record is created, signifying a new file is ready to be processed. That instance will be seeded with code that will automatically connect to the database, find the new file, mark it as "in progress", and begin processing it.
I control when the files get added to the system, so I don't have to worry about some user adding 1000 files and exceeding my EC2 quota. However, I don't see any obvious way to configure auto-scale to work like this. It seems to only trigger instance creation based on CPU or ELB usage.