Skip to main content

How to Create a Custom AMI in AWS

                   How to Create a Custom AMI in AWS


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.
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.
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.
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.

Comments

Popular posts from this blog

AWS S3 Simple Storage Service

                             Amazon  S3  (Simple Storage Service) Amazon Simple Storage Service is storage for the Internet. It is designed to make web-scale computing easier for developers. Amazon  S3  has a simple web services interface that you can use to store and retrieve any amount of data, at any time, from anywhere on the web. What Is Amazon S3? Amazon Simple Storage Service is storage for the Internet. It is designed to make web-scale computing easier for developers. Amazon S3 has a simple web services interface that you can use to store and retrieve any amount of data, at any time, from anywhere on the web. It gives any developer access to the same highly scalable, reliable, fast, inexpensive data storage infrastructure that Amazon uses to run its own global network of web sites. The service aims to maximize benefits of scale and to pass those benefit...

AWS Route 53 & Routing Policy

Amazon Route 53 You can use Amazon Route 53 to register new domains, transfer existing domains, route traffic for your domains to your AWS and external resources, and monitor the health of your resources. Amazon  Route 53  ( Route 53 ) is a scalable and highly available Domain Name System (DNS). It is part of Amazon.com's cloud computing platform, Amazon Web Services (AWS). The name is a reference to TCP or UDP port  53 , where DNS server requests are addressed. ...  Route 53's  servers are distributed throughout the world. DNS management If you already have a domain name, such as example.com, Route 53 can tell the Domain Name System (DNS) where on the Internet to find web servers, mail servers, and other resources for your domain. Learn More Traffic management Route 53 traffic flow provides a visual tool that you can use to create and update sophisticated routing policies to route end users to multiple endpoints for your application. Le...

Amazon EBS Elastic Block Store

     Amazon Elastic Block Store Amazon  Elastic Block Store  (Amazon  EBS ) provides persistent block storage volumes for use with Amazon EC2 instances in the  AWS  Cloud. Each Amazon  EBS volume is automatically replicated within its Availability Zone to protect you from component failure, offering high availability and durability. Amazon Elastic Block Store (Amazon EBS) provides persistent block storage volumes for use with  Amazon EC2  instances in the AWS Cloud. Each Amazon EBS volume is automatically replicated within its Availability Zone to protect you from component failure, offering high availability and durability. Amazon EBS volumes offer the consistent and low-latency performance needed to run your workloads. With Amazon EBS, you can scale your usage up or down within minutes – all while paying a low price for only what you provision. Amazon EBS is designed for application workloads that benefit from fine tu...