πΌοΈ AWS AMIs: Creating a "Golden Image" of Your Server
Hey Cloud Visionaries! π
Welcome to Day 13 of the #100DaysOfCloud Challenge: Create AMI! We are continuing our systematic infrastructure migration with KodeKloud Engineer. Today, we are learning how to "freeze time" and save our server configuration forever.
Our mission: Create an AMI named devops-ec2-ami from the existing EC2 instance named devops-ec2 in the us-east-1 region.
1. Introduction: What is an AMI? π‘
Think of an Amazon Machine Image (AMI) as a blueprint or a snapshot of your entire server.
- Golden Image: Once you spend hours installing software and configuring settings on a server, you don't want to do it again! An AMI saves all of that.
- Mass Replication: You can use one AMI to launch 1, 10, or 100 identical servers in minutes.
- Disaster Recovery: If your server gets corrupted, you can launch a fresh one from your AMI and be back online instantly.
Let's take a "photo" of our devops-ec2 instance! πΈ
2. Step-by-Step Guide: Creating the devops-ec2-ami
We will use the EC2 Dashboard to create this image.
Step 2.1: Locate your Instance
- Log in to the AWS Console and navigate to the EC2 Dashboard.
- Click on "Instances (running)".
- Find the instance named
devops-ec2.
Step 2.2: Create the Image
- Select the
devops-ec2checkbox. - Click the "Actions" button at the top.
- Navigate to "Image and templates" -> "Create image".
-
On the Create image page:
-
Image name: Enter
devops-ec2-ami. - Description: (Optional) "Backup of our devops server."
- Leave everything else as default (AWS will automatically snapshot any attached EBS volumes).
-
Image name: Enter
Click "Create image".
Step 2.3: Verify the AMI State
- In the left sidebar of the EC2 Dashboard, under "Images", click on "AMIs".
- Your new AMI will appear there. Its status will initially be "pending".
- Refresh after a few minutes until the status turns to π’ "available".
Success! You now have a reusable blueprint of your DevOps server. π
3. Key Takeaways π
- Snapshots Included: When you create an AMI, AWS automatically creates snapshots of all the EBS volumes attached to that instance.
- No-Reboot Option: By default, AWS reboots the instance during image creation to ensure data consistency. You can check "No reboot" to keep it online, but the image might be less consistent.
- Regional Resource: AMIs are regional. If you need this image in London, you have to "Copy" the AMI to that region.
4. Common Mistakes to Avoid π«
- Storage Costs: Remember that you are charged for the snapshots stored behind the AMI. Don't keep hundreds of old AMIs you don't need!
- Deleting the Source: You can delete the original
devops-ec2instance, and the AMI will still work perfectly. - Deregistering: If you want to delete an AMI, you must "Deregister" it and then manually delete the associated Snapshots to stop billing.
5. Conclusion + Call to Action! π
Standardizing your environment with AMIs is a hallmark of a professional DevOps workflow. By creating devops-ec2-ami, youβve ensured that the Nautilus team can scale their operations with total consistency.
How are you enjoying the 100 Days of Cloud Challenge? π‘οΈ
- π¬ Letβs connect on LinkedIn: Have you ever used "Packer" to automate your AMI creation? π Hritik Raj
- β Support my journey on GitHub: Check out my progress as I move through all 100 days. π GitHub β 100 Days of Cloud











Top comments (0)