I am getting started with Amazon EC2 and it looks like the best way to go is to generate scripts that take a base OS image and configure the OS/apache/php/mysql after boot-up. That way you can always change base images without having to redo everything.
Sometimes when you do an apt-get install on a package, it asks you configuration questions during the installation. How do you deal with that inside a script?
Also, if you need to edit a configuration file as part of the install process how do you deal with that? Do you make a copy of the modified file and store it on a server where it can be downloaded into the instance and overwrite the default file?