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

What is the best way to persist users created on an AMI instance? (i.e. to an EBS partition)

I could replace the /etc/profiles file, but that doesn't seem portable. I could make a script to re-create the users each time, but that's annoying to maintain. Is there a better way?

share|improve this question
up vote 2 down vote accepted

If your AMI is on an EBS backed volume you should have a persistent root file system! Can you clarify what you mean by "each time", because your problem isn't making sense.

Typically on a system where you had users or software configurations you would get all of these setup, them either rebundle them (for ephemeral backed instances) or snapshot them (for EBS backed instances) into a new AMI, then use that base AMI to launch any new instances you need, starting from wherever you setup your base AMI including whatever users, software and configurations you had on it at the time of bundling/snapshotting.

For systems that you always wanted to start from a stock AMI of some kind, you would typically not have much in the way of users and whatnot, but any system modifications like that you would have built into a script passed at boot time that would create any needed users, install any needed software, download your application, run whatever it is the machine is supposed to do, then shut itself down.

It doesn't sound like that is your use case. If you have users and whatnot, it sounds like you need to setup your own AMI to use as a base by rebundling/snapshoting after you get one configured to your liking.

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.