Home > database >  Applications not running after setting up custom AWS AMI
Applications not running after setting up custom AWS AMI

Time:01-12

I installed and then run docker on a ec2 instance. Then I created an AMI image. Next I created a ec2 instance from the AMI image. I expected that I will have a docker which will be running, but it was not.

I am looking for a way to quick setup ec2 instance with applications that will be installed and running. What is the best way to solve my problem?

CodePudding user response:

You misunderstand what AMIs are. When you create an AMI, it takes a copy of the EBS disk volume. It does not take a copy of what is running in RAM. When you create a new server from the AMI it boots up a new server from scratch, with a copy of the data that was on the disk of your original server. If your original server isn't configured to start those services when it reboots, then a new server created from that AMI won't start those services on boot either.

You need to get these services starting on reboot anyway, because it is not uncommon for Amazon to reboot your EC2 instances occasionally in order to apply security updates to the underlying host servers.

  • Related