0
0
AWScloud~10 mins

Amazon Machine Images (AMIs) in AWS - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - Amazon Machine Images (AMIs)
Create AMI from EC2 Instance
AMI Stored in S3-backed Storage
Launch New EC2 Instance Using AMI
New Instance Has Same OS and Software
Modify or Update Instance
Optionally Create New AMI from Updated Instance
This flow shows how you create an AMI from an EC2 instance, store it, launch new instances from it, and optionally update by creating new AMIs.
Execution Sample
AWS
1. Create AMI from running EC2 instance
2. AMI saved as image with OS and apps
3. Launch new EC2 instance using AMI
4. New instance boots with same setup
This sequence creates an AMI from an EC2 instance and launches a new instance with the same configuration.
Process Table
StepActionInputOutputState Change
1Create AMIEC2 instance ID i-12345AMI ami-abcde createdAMI stored with OS and apps snapshot
2Store AMIAMI ami-abcdeAMI available in AMI listAMI ready for use
3Launch EC2 instanceAMI ami-abcdeNew instance i-67890 launchedNew instance has same OS and apps as original
4Instance runningInstance i-67890Instance ready for useInstance state: running
5Modify instanceInstance i-67890Instance updatedInstance software/config changed
6Create new AMIUpdated instance i-67890AMI ami-fghij createdNew AMI with updated config stored
7ExitNo further actionProcess completeAMI lifecycle demonstrated
💡 Process stops after new AMI creation or when no more instances are launched
Status Tracker
VariableStartAfter Step 1After Step 3After Step 5Final
EC2 Instance IDi-12345i-12345i-67890 (new)i-67890 (updated)i-67890 (updated)
AMI IDnoneami-abcdeami-abcdeami-abcdeami-fghij
Instance Staterunningrunningrunningrunningrunning
Key Moments - 3 Insights
Why does creating an AMI not affect the running EC2 instance?
Because creating an AMI takes a snapshot of the instance's disk without stopping or changing the running instance, as shown in step 1 and 4 of the execution_table.
What happens when you launch a new EC2 instance from an AMI?
A new instance is created with the exact OS and software setup as the AMI, demonstrated in step 3 and 4 where the new instance i-67890 boots with the same configuration.
How can you update an AMI after changing the instance?
You modify the running instance and then create a new AMI from it, as shown in steps 5 and 6 where the updated instance leads to a new AMI ami-fghij.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what is the AMI ID after step 1?
Aami-abcde
Bami-fghij
Cnone
Di-12345
💡 Hint
Check the 'AMI ID' variable in variable_tracker after Step 1
At which step does the new EC2 instance get launched?
AStep 2
BStep 5
CStep 3
DStep 6
💡 Hint
Look at the 'Action' column in execution_table for launching instance
If you modify the instance but do not create a new AMI, what happens to the AMI ID?
AIt changes to a new ID
BIt remains the same
CIt gets deleted
DIt becomes unavailable
💡 Hint
Refer to variable_tracker showing AMI ID after Step 5 before new AMI creation
Concept Snapshot
Amazon Machine Images (AMIs) are snapshots of EC2 instances.
They store OS and software configuration.
You create an AMI from a running instance without stopping it.
Launch new instances using AMIs to replicate setups.
Update instances and create new AMIs to save changes.
Full Transcript
Amazon Machine Images (AMIs) let you save the exact setup of an EC2 instance including its operating system and installed software. You start by creating an AMI from a running EC2 instance, which takes a snapshot without stopping the instance. This AMI is stored and can be used to launch new EC2 instances that have the same configuration as the original. If you update the software or settings on an instance, you can create a new AMI from it to save those changes. This process helps you quickly replicate or scale your environment with consistent setups.