I've gotten a base Debian AMI up and running and now I need to know the best way to maintain it. I've ran the updates (aptitude update/upgrade) and installed/configured my software (Apache, Ruby, etc.) but if I reboot the instance or start a new one I'll have to do all this work over again.

How do you persist these types of things over a reboot? Do you build a new AMI every time you adjust some tiny piece of the system? Or is there some way to feed it a script on startup that configures it in "real-time"? I know I could go all the way with a Reductive Labs Puppet style setup but that's a bit too much for my needs right now (1-2 servers). Any best practices on this?

Update: I found a bit of information on using User-Data to run scripts at instance boot time.


Use Elastic Block Store. Until a month ago it was only possible to use EBS as persistent storage, you still had to boot from an AMI - but it's now possible to boot directly from EBS

  • I was just going to mention that EBS might be the solution for me. Any downsides to using EBS? Speed, reliability, reproducibility? – Richard Jan 2 '10 at 21:42
  • 1
    Actually, I just found a great comparison of the two types of AMIs on Amazon's web site. For anyone else having the same problem in the future check out this chart: docs.amazonwebservices.com/AWSEC2/2009-11-30/UserGuide/… – Richard Jan 2 '10 at 21:48

I use the combination of both: user-data scripts and EBS. First I create an image with basic software, and with an autorun script, the server download its configuration, install the needed software and starts the proper services. If the server manages data, the autorun script copy (via rsync or nfs) all the data from a server with an EBS volume mounted.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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