Soon my website and API will be migrated to Amazon's EC2. Correct my if I'm wrong, but my understanding of an Instance AMI works like:

If I launch an EC2 Instance using a for example Amazon Linux AMI then configure the server to my liking (i.e. install a LAMP stack, setup MySQL databases, etc..) then once completed create an AMI of the Instance. Then I can use the saved AMI to launch more instances using the saved AMI I created, and all future instances I create using the saved AMI will retain all settings that were on the EC2 instance I used to create the AMI.

Is my understanding correct? If I create an AMI of an instance that is fully configured to my liking (installed LAMP stack, MySQL, phpMyAdmin, etc...) then create an AMI for it, I can use the AMI to launch new instances that have the exact same files, options, mysql databases, etc... that were present on the instance used to create the AMI?

  • 1
    You can also use CloudFormation or other automated build tools to achieve something similar. You could have a plain Linux machine, configure the VPC around it, then have the software you need installed (EC2 user data) and download the latest code / files from S3 or elsewhere. This is obviously much slower than starting a server that already has everything installed. You can do both - have an AMI, then using EC2 user data you can update software, download files, etc.
    – Tim
    Jan 13, 2019 at 8:02

1 Answer 1


Yes that’s how it works. AMI is a snapshot of your instance at a certain time and all the files on EBS volumes are saved to the AMI.

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.