Open In App

How To Create AMI using EC2?

Last Updated : 24 Apr, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Pre-requisite: EC2

EC2 is a cloud computing service made available by the Amazon Web Service. AWS is the paid platform for maintaining & using some online sources virtually. The Elastic Compute (EC) is a product inside of the AWS computer service. In simple words, AWS provides a completely virtual platform. There will be a virtual machine available in the AWS EC2. Using that virtual machine, users can install or do some necessary tasks. This is not a completely free service by the Amazon Web Service. Users need to pay some amount to access all the features. Some basic features are available that can be used without paying a single amount of cost. The AMI is one such feature provided by the Amazon Web Service.

The AMI stands for the Amazon Machine Image. This is not a traditional image format that users use all the time, For the naming purpose, such identity is provided for this feature. This AMI feature is completely linked with the instances. In the AWS EC2, there are several instances can be created for installing or operating specific applications. For those instances, there should create AMI. This is the image or a format that stores all the data of the instances. Users can launch multiple instances with the help of a single AMI. This can be done when the configuration of all the instances will be the same as each other.

Steps for Creating an EC2 Instance

Step 1: At first, users need to enter their AWS Account. Then, users will find a tab at the top of the screen. Users need to click on the service button present there. Now, users will get some more options. Users will find the EC2 option present under the Compute Section. Users need to click on that.

aws console

 

Step 2: Now, a new page will open in front of the users. Users will find a button to launch the EC2 instances. Users need to just click on the button provided there.

launch instance

 

Step 3: Now in the next window, a set of options will be available for the users. They are the virtual machines present for specific tasks in AWS. As the intention is to create a simple EC2 Instance, users need to click on the Select Button present there at the very first option. 

select os

 

Step 4: Now, a new window will open in front of the users. Users need to choose the instance type there. It is advised to the users not to make any changes to this window. The default one will already be selected by the system. Users need to just click on the Next button provided there.

instance type

 

Step 5: In the next window, a set of fields will be available for the users. Users are requested not to change any data there. Users need to enter 1 in place of the Number Of Instances. Other than this field, all the fields will be the same as it is. After making these changes, users are requested to click on the Next button.

instance configurations

 

Step 6: Now, in the storage section, there is no need to make any changes. The default option is already provided there by the system. Users need to click on the Next button present there.

storage add

 

Step 7: Now, another field will open for the users. In normal cases, users need to mention the tags needed for some application installation there. But here the intention is to create a simple instance. So, users need to leave this spot blank. And then, they need to click on the Next button for more processes.

add tags

 

Step 8: At last, there will be the security groups configuration page arrive. AWS provides simple security to every instance that is created. In this case, also, there is the default security already provided. Users don’t need to make any changes there. Users need to click on the Review & Launch button.

secuity group

 

Step 9: Then the review page will open in front of the users. All the changes that are made there will be available on the same page. So, there is no need to waste the time by going through all of that. Users need to click on the Launch button.

review + launch

 

Step 10: Now, a new pop-up tab will present in front of the users. Users need to select the Existing Key Pair option from the dropdown menu. As it is a simple instance, there is no need to create any new instance. As this instance will not going to install any application in the AWS. Now, after selecting that, users need to click on the Check Box provided there. In this way, users are providing their content. Now, at last, users need to click on the Launch Instance Button.

Disclaimer: Before providing consent for anything, users need to know about it. It is always advisable to know things better before providing any consent for it. If users think, they might not continue with that acknowledgment consent. This is completely the user’s decision to move ahead or not.

key pair

 

Step 11: Now, the instance will start launching. It will take some time to complete the process. Users need to wait till the process is completed.

Step 12: After completion of the instances, users will find a page that shows the Launching Conformation message. Users might click on the Launch Log to know more about the instance.

launch status

 

Step 13: On the next page, the user will find all the information about the launched instance. And users will notice that the status of the instance is Running.

instance running

 

Hence, we have successfully created one simple instance in AWS EC2. And from here, we will move ahead further for our core interest. 

Steps to Create AMI Using EC2

Step 1: After the creation of the simple instances, users will find an Action dropdown button on the above instance. Users need to place the cursor there. Hence, it will show some more options under the Action button. Users will find an Image option provided there. If the users again place the cursor above there, it will show some new options. Among those options, one will hopefully be disabled. Another option will enable the use. Users need to click on the option Create Image to move forward.

select instance

 

Step 2: Then a new window will open. Users need to provide the image name there. All the other fields need not be filled. After providing some name to this field, users need to click on the Create Image option. Hence, the AMI will generate for the instance of the EC2.

Note: Users are requested not to make any changes to the other options provided in that window. If necessary, users can write down some descriptions related to the AMI. But other than that, there is no need to make any changes. Changing any option, without knowing the proper reason or need might cause errors in the future.

image config

 

Step 3: Now, users will get a message that the AMI is created successfully. This takes some time to provide this message. Now, users can click on the Close button to remove the Window.

create image

 

Step 4: Now, if users see on the left-hand side panel, there will be one option present. This option will be the Image option. Under that Image option, one more option is present. This will be the AMI. Users need to click on that.

images

 

Step 5: Now, there all the details of the AMI will be available. The AMI name, ID, Source, etc. all related options will be present there.

Note: Sometimes, under the Status section of the AMI, users can see the Pending Status. This means that the AMI is not completely ready now. But there is no need to be worried about that. Sometimes, due to slow internet speed or some technical problem, it takes some time to complete. If users again see this panel after some time, it will provide Available Status. Or users can simply refresh the page for updated status.

instance available

 

Hence, we have successfully created AMI using EC2 instances.

Conclusion

Amazon Machine Image is not a traditional image format. Rather, it is a configuration block for the Amazon Web Service. This is completely associated with the Elastic Compute service. When users create an EC2 instance, then users should need to create the AMI for that instance. As this will help to create some more similar instances with the help of the same Amazon Machine Image. In this article, we have discussed the process to create a simple EC2 Instance in AWS. It is the necessary pre-requisite for further moving ahead. In this article, we have also demonstrated the method to create AMI using EC2 instances. All the steps that need to execute the process are discussed here with proper screenshots.



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads