How to create a custom AMI on AWS

Amazon Machine Image (AMI) provides the information needed to launch an instance, is a virtual server in the cloud. There are several AMIs available on AWS, but what if we want to create a custom AMI on AWS. This guide is about how to create a custom AMI in AWS.

The following are the main reasons for creating a custom AMI on AWS:

  • You need to bundle packages first instead of installing them after downloading the instance.
  • You must control the update time of the package to ensure a consistent base image for your layer.
  • You need LOAD-BASED instances in particular to load as fast as possible.

Once you’re ready with your custom EC2 instance. We can create a custom AMI in AWS so that it can be used to launch multiple instances based on requirements. As an example, we will create custom AMIs in AWS for our web server.

Steps to create a custom AMI on AWS:

  1. Sign in to the AWS Console
  2. Go to the EC2 pane and select the instance for which you want to create a custom AMI.
  3. Then click on Action and select Image-> Create image as shown below:
  4. In the next pop-up window, the system will ask “Image name“And”Image description“. Alternatively, you can resize the root volume if you want to resize, however in our case we keep the same ones as shown below. Click the “Create Imagecreate custom AMI in AWS

How to check the created custom AMI.

  1. To check the AMI status of the creation process, go to Images-> AMIs. You will see a waiting status as shown below for some time.create custom AMI in AWS
  2. After the process is completed, the status will be as “Available”:create custom AMI in AWS
  3. Also in the snapshot inside in EBS (ELASTIC BLOCK STORE), you may be able to see the snapshot for the AMI image we created.create custom AMI in AWS

How to run a custom AMI on AWS.

Now in case you want to launch this customized AMI in the future, just go to the EC2 panel and select Launch Instance. And you are able to see our custom AMI created in the “My AMIs” tab.

create custom AMI in AWS

After you install the AMI, it will be launched at the end of the process.

So this is how we can create a custom AMI in AWS.

Sidebar