Create EC2 Instance From Custom AMI

You have an EC2 instance and you have made configuration changes in the Operating systems and configured some applications and made changes for that as well.

Now you want to create another EC2 instance with the same configurations.So we will take the backup of that instance (AMI) which is known as Custom AMI.

In this blog post , We will learn to Create EC2 instance from Custom AMI

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.

Prerequisites

  • AMI of an EC2 Instance

Refer this article , If you want to know How to Create an AMI from existing EC2 Instance

Now we have an AMI in place. Lets go ahead and launch an EC2 instance from the Custom AMI which we have created.

Launching EC2 Instance From Custom AMI

Login to EC2 CONSOLE , Under Images , Choose AMI

Select the AMI which you have created.

Click Launch,

Here you will asked to follow the same process of Instance creation.During this process If you feel like you want to make some configuration changes to the EC2 instance such as Instance type , EBS Volume , Security group.

You can refer this article , For Launching EC2 Instance from Console

Step 1: Selecting Instance Type

You can select any instance type as per your application needs,

Once selected , Click Next: Configure Instance Details

Step 2 : Configuring Instance Details

You can change the configurations such as VPC , Subnet , IAM role and many more.

You can change the shutdown behaviour of EC2 instance , Enable termination protection from accidental termination.

Click Next: Add storage

Step 3 : Adding Storage

In this step , You can change the size and volume type of the EBS volume.

Also You can add a additional EBS volume to the EC2 Instance.

Click Next: Add Tags

Step 4 : Adding Tags To EC2 Instance

It’s always recommended to add a tag to the EC2 instances.

Tags will be applied to the EC2 Instance and the Volumes.

You can add multiple tags to the EC2 instance , If you want to segregate the instance based on the Environment.

Click Next: Configure Security Group

Step 5 : Configuring Security Group

You can create a new security group for this EC2 instance or You can use an existing one.

Click Review and Launch.

You can review all the configurations of the EC2 Instance , Once verified , Click Launch

You can create a New key pair or attach an existing key pair for this EC2 Instance.

And finally click Launch.

Conclusion

We have successfully created an EC2 Instance from the Custom AMI with optionally few changes to the EC2 Instance configuration.

Hope you found it helpful.Thanks for reading this article.

Please do checkout my other publications.