Lab 6. Creating and Using AMIs

Overview

In this lab we are going to create Image of our webserver and queue server by using the Amazon Machine Image(AMI).

AMI (Amazon Machine Image)

An Amazon Machine Image (AMI) is a special type of virtual appliance that is used to instantiate (create) a virtual machine within the Amazon Elastic Compute Cloud (“EC2”). It serves as the basic unit of deployment for services delivered using EC2.

By doing this lab you will learn:

  • How to create an Image of an existing Instance
  • How to launch AMI and Create a new instance

The image shown below is the architecture for this lab.

s

To create a Image of an instance go to > Services > select EC2 > click on instances> right click on an instance > select Image > click on create image.

Screenshot (1)

When you click on the create image a new window will pop-up, in that window give the details as below.

Image name= DinostoreWebserver
Image Description: Image of the Dinostore website vm
Keep the default storage amount (Edit if needed)

After filling all the details click on Create Image.

Note: You can give the details as you like, it doesn’t have to be the same as above details.

Screenshot (2)

When you click on create image you will see a message saying ‘Create Image request recieved’.

Screenshot (3)

After creating the image of the webserver do the same procedure to create an image for the queueserver and give the following details.

Image name= Dinoqueueserver
Image Description: Image of the Dinostore queue server vm
Keep the default storage amount (Edit if needed)

After filling all the details click on Create Image.

Screenshot (4)

You can see the progress of the image creation in the EC2-AMI, Check the left navigation pane. wait till the images get created.

Screenshot (5)Screenshot (6)

When the images are created, right click on the webserver instance and click on Launch.

Screenshot (7)

Choose the instance type as t2.micro.

Screenshot (8)

In the Configure Instance details keep the default settings for subnet.
Select the IAM Role as WebServerRole.

Keep the default settings in the Add Storage and click on next.

1

Add a tag so identifying it will be easier. and click on next.

2

Select the existing security policy which you created for WebRDPGroup. click Next.3

Review the configuration details you have given and click on launch.

4

After clicking on Launch you will have to choose a keypair. Choose the same keypair you created for the original Webserver and the queue server.

5

In your local browser run the original webserver and note the IP address on the left of the web page. ( My IP is 172.31.8.23)

3

Now run the new webserver instance you created by copying the public DNS string and add your file name to the URL. Note the IP address has changed. (My IP is 172.31.8.85).

6

After all the steps are completed successfully, you have completed lab 6.

Conclusion

By the end of this lab you have learned:

  • How to create an Image of an existing Instance
  • How to launch AMI and Create a new instance

Budget

In this lab you will charge same as you get charged for instances, therefore keep them off.

Advertisements
This entry was posted in Dinostore Labs. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s