It seems that you did nothing wrong when setting up a new instance.
I don't know what you had in that instance, but one idea I have is that when you create an AMI from an instance, the default behavior of AWS is to reboot the instance:
Amazon EC2 powers down the instance before creating the AMI to ensure that everything on the instance is stopped and in a consistent state during the creation process. If you're confident that your instance is in a consistent state appropriate for AMI creation, you can tell Amazon EC2 not to power down and reboot the instance. Some file systems, such as xfs, can freeze and unfreeze activity, making it safe to create the image without rebooting the instance.
Maybe your web-server does not start on system start-up?