100 Days of AWS - Day 9 EC2 AMIs vs Instance Types.
Welcome to Day 9! We are expanding on our EC2 experience by exploring the two main options you have when deploying a virtual server: what software is installed on it (AMI) and what hardware on which it is deployed ( Instance Type ).
The Question
A developer has perfectly configured an EC2 instance with a specific OS, web server software, and application code. They now need to launch ten more identical instances for a web fleet.
What should they create from the original instance to ensure all new instances are perfect clones?
The Correct Answer
- The right one is (B) An Amazon Machine Image (AMI).
- The Software Blueprint is an excellent resource explaining why it is right.
- An Amazon Machine Image (AMI) is an EC2 instance template. Like a blueprint it contains:
- The Operating System (e.g. Amazon Linux 2, Windows server 2022).
- The programs and applications that are running on that OS (e.g. Apache web server, your application code, libraries that it needs).
- The permission settings and the structure.
- You can make a reusable template by making a personal AMI of your optimally set up golden instance. This AMI can then be used to create one or one hundred new instances, which are all the same and save colossal amount of time and provide consistency.
The Incorrect Options Analysed.
(A) An EC2 Instance Type: This provides the hardware of your instance, the CPU, memory (RAM), storage and networking capacity. For example, t2.micro or m5.large. It is not related to the software installed on the instance.
(C) An EBS Snapshot: An EBS Snapshot is a snapshot of an EBS volume (the hard-drive) in time. Although an AMI is storing the data on the root volume using snapshots under the hood, the AMI is the entire entity of registering these snapshots into a launchable template. It is not enough to create a snapshot and be able to start a new instance, but with the same content.
(D) A Launch Configuration: This is an older configuration that can be used with Auto Scaling Groups to specify what should be launched (e.g. launch the AMI with ID ami-12345 in instance type t2.micro). It is based on the AMI; it is not the software template. (Note: Launch Templates are the new version of the Launch Configurations).
An Easy Parallel Bake a Cake 🎂.
- In case the process of launching an EC2 instance resembles baking a cake:
- The Instance Type is size of cake pan and oven (hardware specifications).
- Your recipe and pre-cooked ingredients (software and configuration) are the AMI.
- You have to have both of them to make a successful cake, but what makes each cake you make the same is the recipe (AMI).
Keywords
- Amazon Machine Image (AMI)
- EC2 Instance Types
- AWS EC2
- Virtual Server
- Golden Image
- EBS Snapshot
- Launch Template
- EC2 Configuration
- AWS Compute
- vCPU
- EC2 Instance Family
- "what is an ami in aws"
- "difference between ami and instance type"
- "how to create a custom ami from an ec2 instance"
- "choosing the right ec2 instance type"
- "ami vs ebs snapshot for backup"
0 Comments