Home  >  Blog  >   AWS  > 

Creating a Custom AMI in AWS

Amazon Machine Images (AMIs) are the technology that enables the creation of Amazon EC2 instances in AWS. An AMI is essentially a pre-configured template for configuring an Amazon EC2 instance in a certain way. This article will aid you in customizing an existing AMI and in comprehending the approach.

Rating: 5
  
 
6929
  1. Share:
AWS Articles

Create a Custom AMI

An Amazon Machine Image (AMI) provides the information required to launch an instance, which is a virtual server in the cloud. You specify an AMI when you launch an instance, and you can launch as many instances from the AMI as you need. You can also launch instances from as many different AMIs as you need.

The sole purpose of this tutorial is to customize an existing AMI and to understand the procedure involved in it.

To gain in-depth knowledge and be on par with practical experience, then explore AWS SysOps Training.

AWS OpsWorks supports two ways to customize instances: custom Amazon Machine Images (AMIs) and Chef recipes. Both approaches give you control over which packages and package versions are installed, how they are configured, and so on. However, each approach has different advantages, so the best one depends on your requirements.

The following are the primary reasons to consider when using a custom AMI:

  • You want to prebundle specific packages instead of installing them after the instance boots.
  • You want to control the timing of package updates to provide a consistent base image for your layer.
  • You want instances—load-based instances in particular—to boot as quickly as possible.

Now that we have customized our Amazon EC2 instance using the Amazon Machine Image (AMI), we can save and launch future environments with this configuration. AMI is specified while launching an instance and as many instances as you need can be launched.

MindMajix YouTube Channel

To create an AMI from a running Amazon EC2 instance

  • Open the Amazon EC2 console at https:// console.aws.amazon.com/ ec2/.
  • In the Navigation pane, in the Region list, click US East (Virginia).
  • In the Navigation pane, click Instances.
  • On the Instances page, right-click your running instance, and then click Create Image (EBS AMI).
  • In the Create Image dialog box, fill in a unique image name and an optional description of the image (up to 255 characters), and then click Create This Image.

 

For an in-depth understanding and practical experience, Explore AWS Architect Training.

Amazon EC2 terminates the instance, takes images of any volumes that were attached, creates and registers the AMI, and then relaunches the instance.

  • In the Navigation pane, click AMIs.
  • View the status of the AMI.
  • While the new AMI is being created, its status is pending.
  • Record the AMI ID; as you might need it in a later task.

It takes a few minutes for the whole process to finish and for AMI to be created. Once it is finished, it appears in AMIs view in AWS Explorer.

  • When the status of your AMI changes to available, go to the Snapshots page by clicking Snapshots in the Navigation pane. View the new snapshot that was created for the AMI. Any instance, that you launch from the new AMI uses this snapshot as its root device volume.

Eventually, you’ll probably want to have multiple Amazon EC2 instances running across multiple Availability Zones. If one Availability Zone becomes unavailable, the traffic will be rerouted to another Availability Zone. An Elastic Load Balancer will enhance the availability of your application, whether all of your instances are in the same Availability Zone or in multiple Availability Zones. To create an Elastic Load Balancer, move on to further post Create an Elastic Load Balancer.

Are you interested to learn  AWS and building a career in Cloud Computing?  Then check out our AWS Certification Training Course at your near Cities

AWS Training in Ahmedabad, AWS Training in BangaloreAWS Training in ChennaiAWS Training in DelhiAWS Training in DallasAWS Training in HyderabadAWS Training in KolkataAWS Training in LondonAWS Training in MumbaiAWS Training in NewYorkAWS Training in NoidaAWS Training in PuneAWS Training in Toronto.

These courses are incorporated with Live instructor-led training, Industry Use cases, and hands-on live projects. This training program will make you an expert in AWS and help you to achieve your dream job.

List Of AWS Courses Offered By Mindmajix:

 AWS Certified SysOps Administrator  AWS Certified Solutions Architect / Professional
 AWS Certified Developer  AWS Certified DevOps Engineer
 AWS Technical Essentials  AWS Database Migration Service
 AWS Lambda 2016  and many more...

 

Join our newsletter
inbox

Stay updated with our newsletter, packed with Tutorials, Interview Questions, How-to's, Tips & Tricks, Latest Trends & Updates, and more ➤ Straight to your inbox!

Course Schedule
NameDates
AWS TrainingAug 05 to Aug 20
AWS TrainingAug 08 to Aug 23
AWS TrainingAug 12 to Aug 27
AWS TrainingAug 15 to Aug 30
Last updated: 04 August 2023
About Author
Remy Sharp
Prasanthi

Prasanthi is an expert writer in MongoDB, and has written for various reputable online and print publications. At present, she is working for MindMajix, and writes content not only on MongoDB, but also on Sharepoint, Uipath, and AWS.

Recommended Courses

1 /15