Amazon EC2 (Elastic Compute Cloud) is an offering from AWS providing compute capacity on demand. AMI or Amazon Machine Image is a template from which an EC2 instance can be built.
When we launch an EC2 instance, it indicates that a virtual machine is created. The AMI that we selected is copied to the root device volume. This contains the boot image. Once the instance starts, what we get is a virtual machine that we can connect to.
Typically, we’ll install further software and packages as per our needs.
Once we have an instance properly configured, we can use this instance to create an AMI. This resulting AMI can then be used to start the new EC2 instance.
There are several categories of AMIs available on the AWS console:
Quick start AMIs
These are images provided by Amazon. These can be used to get started quickly.
AWS marketplace AMIs
These are images that provide popular open-source and commercial software from third-party vendors.
My AMIs
These are created from your EC2 instances.
Community AMIs
These are provided by the user community of AWS.
Using an AMI can help us quickly get started with an EC2 instance bringing our bootstrap time close to nil.