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)
- On the top of the AWS Management Console, Click EC2 under Compute Section
- 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.
- Click “Select” for choosing instance Type. We will choose General Purpose t2.micro instance.
- 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.
- Click “Next: Add Storage”. Select default storage and Click on “Next: Add Tags”.
- On the Tag Storage page, type a name for your Amazon EC2 instance. Type in the value field = “EC2webserver”.
- 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.
- Remember that under one VPC, you can create many different security groups to manage each instance separately. Now Click ” Review and Launch“.
- 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.
- 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.
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: 184.108.40.206
- 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.
- 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.
- 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“.
- Now you will see your public DNS link, User name and password. Launch your RDP and paste password to connect your windows system.
- Now launch your RDP. You will get the following dialogue box. Paste your password and Click “OK”.
- Your connection is established. You will get the following dialogue box of Remote connection certification.Click “Yes”.
- The remote Desktop connection has been established. You can now view the following screen.
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:
- Make your you downloaded .pem key pair during Amazon Ec2 Instance launch
- You deleted or modified any character in .pem encrypted file before decrypted it for getting password
- Your network is allowed outbound TCP connection of port number 3389 (RDP) because some network firewalls block RDP port.
- You are not deleted or change default RDP port 3389 rule which is allowing inbound connection to your EC2 windows server.
Thank you 🙂