Lab5: Introduction to Amazon Elastic Compute Cloud (EC2) with Windows Server

This lab I will demonstrate the following contents:

  • Creating a Windows Server Instance from an Amazon Image (AMI)
  • Connection to Amazon EC2 Windows instance

Steps for the task: Creating a Windows Server Instance from an Amazon Image (AMI)

  1. On the top of the AWS Management Console, Click EC2 under Compute Section1.jpg
  2. As we are going to launch Amazon EC2 Window server, we selected Window Server 2012 R2 Base 64 bits from “Choose an Amazon Machine Image (AMI)” Page. 2.jpg
  3. Click “Select” for choosing instance Type. We will choose General Purpose t2.micro instance.3.jpg
  4. Now Click ” Next: Configure Instance Details“. In this section of Network, we need to choose VPC where we will launch our instance. As I already created myVPC in my lab2 exercise. I selected myVPC as the network. If you don’t have VPC, you can create new VPC here. Click “Create New VPC “  right side of VPC drop-down. This machine I will access from my local machines. That’s why I selected  VPC public subnet as Subnet here.4.jpg
  5. Click “Next: Add Storage”. Select default storage and Click on “Next: Add Tags”.5.jpg
  6. On the Tag Storage page, type a name for your Amazon EC2 instance. Type in the value field = “EC2webserver”.6.jpg
  7. Then Click ” Next: Configure Security Group“. You can create new security group or you can assign your instance into existing security group. As it is lab practice, I am going to select create a new security group. Note: The security group named “launch-wizard-1” will be automatically created. As we are going to launch Windows server instance, By default security group rule to open port 3389 for RDP has been automatically added.7.jpg
  8. Remember that under one VPC, you can create many different security groups to manage each instance separately. Now Click ” Review and Launch“.
  9. After clicking “Launch” a new dialogue box will appear with Select an existing key pair or create a new key pair option. As we already created a key pair for our previous Amazon EC2 with Linux server exercise.Therefore, we are not going to create a new key pair. Note: If you don’t understand how to create a key pair; please review my lab4 exercise.8.jpg
  10. Click Launch Instance. Your Windows Server Instance will be successfully launched. Click “View Instance“. You will see your instance is initiating. It will take a few second to changes its instance state. If the instance state=running, Status checks=2/2 checks passed. That means your Amazon EC2 instance is ready and you’ll able to access it through RDP.9.jpg

Steps for the task: Connecting to Amazon Instance via RDP

Now we will establish a connection from our local machine to newly created Amazon EC2 Windows server through Remote Desktop (RDP). All Amazon EC2 instance are assigned two IP address and two DNS name at launch. The Public DNS name resolve to the public IP address which is accessible outside of Amazon network and also to the private IP address within the EC2 network.

All Amazon EC2 instance are assigned two IP address and two DNS name at launch. The Public DNS name resolve to the public IP address which is accessible outside of Amazon network and also to the private IP address within the EC2 network. On the other hand; Private DNS name can only be resolved with the Amazon EC2 network.

In this lab; Amazon EC2 instance Public DNS: ec2-54-70-122-154.us-west-2.compute.amazonaws.com and IPv4 Public IP: 54.70.122.154

  1. Now we will connect to our EC2 windows server through RDP. Go to your EC2 instance dashboard in the EC2 management console. Select instance “EC2WebServer” and click Connect button from the top up menu.10.jpg
  2. After clicking “Connect” tab, you will view the following Wizard from where you will Get Password and Remote Desktop file. Download the Remote Desktop file and save it to your local machine. 11.jpg
  3. For getting the Password, click “Get Password”. You will get another wizard. Now click “Browse” and give the location of your key pair path which you downloaded during your launch instance. Then click ” Decrypt Password“. 12.jpg
  4. Now you will see your public DNS link, User name and password. Launch your RDP and paste password to connect your windows system.13.jpg
  5. Now launch your RDP. You will get the following dialogue box. Paste your password and Click “OK”.14
  6. Your connection is established. You will get the following dialogue box of Remote connection certification.Click “Yes”. 15.jpg
  7. The remote Desktop connection has been established. You can now view the following screen. 16.jpg

Critical issues to establish RDP connection:

If you fail to connect your Amazon EC2 instance via RDP client, you have to verify some elements which are relevant to make an RDP connection:

  1. Make your you downloaded .pem key pair during Amazon Ec2 Instance launch
  2. You deleted or modified any character  in .pem encrypted file before decrypted it for getting password
  3. Your network is allowed outbound TCP connection of port number 3389 (RDP) because some network firewalls block RDP port.
  4. You are not deleted or change default RDP port 3389 rule which is allowing inbound connection to your EC2 windows server.

Thank you 🙂

Advertisements

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