How to create an AMI of an EC2 Instance in AWS.

How to create an AMI of an EC2 Instance in AWS.

Before creating an AMI, let's get to know what the heck is AMI ??

AMI- AMI stands for Amazon machine image. which is a template that provides the information required to launch an EC2 Instance. You must specify an AMI when you launch an instance.

AMI contains one or more Amazon EBS snapshots or for Instance-store-backed AMIs, a template for the root volume of the instance (Like, an operating system, an application server, and applications).

It will have Launch permissions that control which AWS accounts can use the AMI to launch instances.

Now let's create an AMI of an Ec2 Instance.

Note: We can create an AMI either from Running or stopped Instances.

Here I'm creating an AMI of my Grafana Instance which is currently running.

Click on the Instance where you want to create an AMI.

Then, click on Create image in Image and Templates under actions.

In the Create Image dialog box, type a unique name and description.

By default, Amazon EC2 shuts down the instance, takes snapshots of any attached volumes, creates and registers the AMI, and then reboots the instance. Click on the No reboot option if you don’t want your instance to be shut down.

Give tags for your AMI if required and click on create.

It might take a few minutes for the AMI to be created. All the AMIs will be available under the Images section.

from the Viewing drop-down list, choose Owned By Me in the Images section and search for the AMI that you have created.

You may need to click on Refresh to see your AMI. When the AMI first appears, it may be in a pending state, but after a few moments, it transitions to an available state.

Once the AMI is available we can use this image for launching the Ec2 Instances.

If you like this article then please consider following me, Deekshith Reddy

Peace. ✌️