What is AMI?

An Amazon Machine Image (AMI) is a template that contains a software configuration (for example, an operating system, an application server, and applications.

The Amazon machine Images provides the necessary information required to launch an instance.

You must select an AMI when you launch an instance.

If you want to launch multiple instances using same configurations, You can do it from single AMI.

Also you can use different AMI’s to launch different EC2 Instances with Different configurations.

AMI includes:

  • one or more EBS snapshots, Which means , by default each ec2 instance is attached with root volume , It will create a backup of the volume as well.
  • A block device mapping that specifies that volume to be attached to the instance when it’s launched.

Prerequisite:

  • One running EC2 Instance.

Creating your Own AMI:

You can launch an instance from existing AMI, make configuration changes, customize the instance, then save this upudated configuration as Custom AMI.

To create an AMI from instance using Console:

Go to EC2 management Console:

https://ap-southeast-1.console.aws.amazon.com/ec2/v2/home?region=ap-southeast-1#Home:

Choose Instances , Select your instance from which you want to create an AMI.

Choose Actions , Select Image , Create image.

AMI

Fill up the details and Most importantly , You should check no reboot , To avoid instance from rebooting.

choose Create Image

AMI
AMI

Click on the AMI ID, It will take you to AMI Page.

It may take a few minutes for the AMI to be created.

AMI

You can find the AMI ID for the AMI you have created from your existing EC2 Instance.

We have created custom AMI from our existing EC2 Instance.

Now, You can launch an instance from this AMI, by simply clicking launch.

Please do checkout my other articles on AWS.