My suggestion would be this:
- Upload files to S3, and then immediately add a message/item to an SQS Queue that has the file name that needs to be processed.
- Setup AWS Autoscale policy that launces ec2 instances depending on the size of the Queue (the number of files waiting to be processed).
- After the launched ec2 instance processes a file, it deletes the item from the SQS queue.
- If there is no more items to be processed the EC2 instances shuts itself down.
Something to keep in mind however, when you spin up an instance you pay for the whole hour, so you don't want to spin up an instance and do a few minutes worth of work and then shutdown or sit idle - better to wait until you have enough work ready to process for close to an hour if possible i.e. when the queue grows to a certain size. - (spin instances up fast, but shut them down slowly)
Thats the high-level idea...adapt as you see fit.