Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to download 100 GB of files (it’s in about 150 files) within a 7 day period before they expire. The download is rate-limited by the host so it takes MUCH longer than the theoretical transfer rate based on normal Internet speeds. I have a script of curl commands - one line per file.

I had the idea of automatically spinning up n EC2 instances, executing the command and FTPing the files to a central location, then shutting down the machines. How would I do this?

I don't care whether it's Linux or Windows.

share|improve this question
up vote 7 down vote accepted

I would recommend using one of Canonical's AMIs in conjuction with cloud-init

Look for the section about "User-Data Scripts" where you can use the --user-data-file to auto-launch a script on startup. Thus, you can just put all the commands you want to run in the script and put "shutdown -h now" at the end of the script.

share|improve this answer
It looks like the official Amazon Linux AMI also supports CloudInit: – dialt0ne Feb 5 '11 at 3:57

I've used boto to script such things before. Easiest to spin up linux images then ssh into them to have them do work.

share|improve this answer

Not sure of the best solution. But if you are doing this on a regular basis and need something to automatically start and stop your machines, then you may want to look at this product: (with the disclaimer that I am the CTO).

share|improve this answer
your product looks great and your site looks terrific too. I accepted the other answer though because it was more specific about the scripts. – Howiecamp Feb 2 '11 at 16:13

Vagrant with the AWS provider does that easily, and is multi-platform.

Once the Vagrantfile is created, then you launch the instance with vagrant up, login to it with vagrant ssh, and destroy it with vagrant destroy. Super-easy.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.