6-Lab-Creating and Using AMIs

An Amazon Machine Image (AMI) is a kind  of virtual appliance   used in creation of  a virtual machine within the Amazon Elastic Compute Cloud [“EC2”]. It serves as the basic unit of deployment for services delivered using EC2.AMI is a template.this    is like a   copy of the instances in AWS. We can add few configurations to  an AMI, and we can launch as many  as instances depending on the need  from an  AMI.It helps in automation.we are creating these AMIs inoder to make highly available.these are like  a sort of templates.

the below diagram shows where we are in the reference architecture.

diagram

In this lab we  are creating  an Image file from already  created server instances namely ‘webserver5’ ‘Queueserver5’ and create a sort of template of that virtual machine that you can launch as many instances as you want from.

In this lab we are going to

1)Create an AMI Image

2)Launch the AMI Image

3)Test the Instance

In this step , we are going to create an AMI from  the original Server. we can  launch lot of  instances  from your virtual machines template depending on the necessity. AMI helps in  creation of a replicated server with the  exact configurations of production Server. it balances  the load  and helps in high-performance  for the applications that  run on Amazon EC2 instances

go to EC2 Console from services menu in the AWS management tools. Right click on the  webserver  instance. Select “Image” and Click  “Create Image“.Screenshot (1074)give the the name and image description for the newly created  image. I have given the image name as ‘DinoStoreWebServer’  Then Click “Create Image”. Now  AMI will be created.Screenshot (1075)

Once the image has been created it will be displayed as below Screenshot (1076)

Now create an image for the queueserver5. Give the name of the image as ‘DinoQueueServer5’ then click create it will be displayed as below.

Screenshot (1077)Screenshot (1078)

Now select  the “AMIs” options under EC2 Dashboard from EC2 management console page. we  can view the  newly created images.

Screenshot (1079)

Now we are going to launch the replica server that is an instance from the images created. For launching EC2 instance from AMI images of Web Server [Webserver5], Click on “DinostoreWebServer” and select “Launch

Screenshot (1080)

select the general purpose t2.micro

Screenshot (1081)

give the instance details.choose the role named ‘WebServerRole’

Screenshot (1083)add the storage by leaving it default.Screenshot (1084)add the tag name by giving it the name as WebServer02Screenshot (1085)Click Next: Configure Security Group. Select an existing security group  that is WebRDPGroupScreenshot (1087)review and launch the instance.Screenshot (1088)give the exiting key pair of server as it is the replica  Screenshot (1089)this instance will be exact copy of the main server.Launch the  Server “WebServer 02” by clicking “Connect”. Give the  credentialsScreenshot (1091)If every thing goes well it will be displayed as belowScreenshot (1092)Screenshot (1093)we can even login to the webpage as shown belowScreenshot (1096)

conclusion:

The amazon machine images are the exact replication of the main server when ever there is problem with the server we can run this replicated images ,that is  the machine images that are created from main server.As every aspect of these will be similar and does the same function of the main server.

In this lab i have not faced any errors hoping you too wont have errors

Thank You…………………!