# Day 13 : Create AMI from EC2 Instance

Welcome to Day 13. In this lab, you will learn how to create an AMI from an EC2 instance. The EC2 instance **datacenter-ec2** is already set up. You just need to create an AMI from this EC2 instance. You need to name the AMI as **datacenter-ec2-ami**.

### What is AMI and how it work?

An AWS AMI (Amazon Machine Image) is a **preconfigured template** used to launch EC2 instances. Think of it as a "golden image" that contains everything needed for a virtual server to start running.

### Types of AMI

| **Type** | **Description** |
| --- | --- |
| AWS managed AMI | Provided by AWS (Amazon Linux, Windows Server). |
| Custom AMI | Created by you from a running EC2 instance. |
| Marketplace AMI | Provided by vendors (e.g., Bitnami NGINX, RedHat, Cisco). |
| Community AMI | Shared by AWS community users. |

### **Why do we use AMIs?**

**1\. Launch servers quickly**

No need to install OS and apps each time.

**2\. Create identical environments**

Perfect for production, scaling, auto-scaling groups (ASG).

**3\. Backup and recovery**

You can create a “snapshot-based” backup of your system.

**4\. Scaling auto-scaling groups**

ASG uses AMIs to create identical instances during scaling.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1765008545344/b84d3232-004d-4fbf-86ee-338402356151.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1765008583135/90f3d1e3-8d0e-43a7-89c5-292202dfbe69.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1765008600625/490ffc24-feaa-43bd-abe3-8579a8e3e66b.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1765008777754/f8cc8241-2974-4ae1-a070-a52ec6b42ae8.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1765008703406/c70d8586-698e-4d68-ae4a-d1f0b824f711.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1765008829813/0acbbab5-0f8c-4f4a-9657-1cd52ad872a4.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1765008861219/7822a45b-3f54-4665-b34d-361cc7661b31.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1765008881223/1699c9ef-7b9f-4649-b11f-5402b8f5209b.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1765008902783/20da7390-cacd-4480-8577-4df4b319a8db.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1765008941675/29050f91-dd58-4354-82e9-3b246022240c.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1765009187123/a59fc597-4a8e-4331-9127-38d8bf3e9373.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1765009208262/8a1ae339-5af9-4b61-8fca-3b5cb43d8cdc.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1765009230548/051736a1-f915-4b5a-bed0-e16a00ffc814.png align="center")

Congratulations you did it. It looks good. This lab was successfully completed without any errors. See you in day 14. If you have any issues please let me know I will be happy to assist you. Stay tuned and learn together. If you find my article useful, please kindly like and share it.
