Overview
Lab details
- This lab walks you through the steps to launch and configure a virtual machine in the Amazon cloud.
- You will practice using Amazon Machine Images to launch Windows EC2 Instance and connect it using Remote Desktop Connection(RDC)
- Duration: 45 minutes
- AWS Region: US East (N. Virginia) us-east-1
Introduction
What is EC2?
- EC2 stands for Elastic Compute Cloud, which is a service provided by Amazon Web Services (AWS).
- It is a virtual environment where you can create and manage virtual machines (referred to as instances) in the cloud.
- EC2 instances can be launched from preconfigured templates called images, which are provided by AWS in the form of Amazon Machine Images (AMIs).
- You can also install custom applications and services on EC2 instances.
- EC2 allows you to scale your infrastructure up or down easily based on demand.
- You can choose from multiple configurations of CPU, memory, storage, and other resources.
- There is no limitation on storage, and you can pick the storage type based on the instance type you are working on.
- EC2 provides temporary storage volumes called Instance Store Volumes, which are deleted when the instance is terminated. Persistent storage volumes are also available as Elastic Block Store (EBS) volumes.
Architecture diagram

Task details
- Sign in to AWS Management Console
- Create an Amazon Windows Instance from Microsoft Windows Server.
- Connect your EC2 Instance using Remote Desktop Connection.
- Installing IIS server using Command Line.
- Testing the default Web Page.
- Creating a Custom Web Page.
- Validation of the lab.
Prerequisites
In order to proceed with the lab, you should have a Remote Desktop application on your computer.For Windows users
- Click on the Start button, and search for RDC. You will find the Remote Desktop Connection application.

For Mac users
- On Mac, we have to download the Remote Desktop application.
- Go to the App Store, and search for Windows App and download the following application.

For Linux users
- On Linux, Remmina is usually included in the distribution.
- If not, go to https://remmina.org/how-to-install-remmina/ and follow the instructions to install for any Linux distribution.
Launching the lab environment
- To launch the lab environment, click on the Launch lab button.
- Please wait until the cloud environment is provisioned. It will take less than a minute to provision.
- Once the Lab is started, you will be provided with IAM username, Password, Access Key, and Secret Access Key.
You can only start one lab at any given time
Lab guide
Lab steps
Task 1: Sign in to AWS Management Console
- Click on the Open console button, and you will get redirected to AWS Console in a new browser tab.
-
On the AWS sign-in page,
- Leave the Account ID as default. Never edit/remove the 12-digit Account ID present in the AWS Console. Otherwise, you cannot proceed with the lab.
- Now copy your Username and Password in the Lab Console to the IAM Username and Password in AWS Console and click on the Sign-in button.
- Once Signed In to the AWS Management Console, make the default AWS Region as US East (N. Virginia) us-east-1.
If you face any issues, please go through FAQs and Troubleshooting.
Task 2: Launching an EC2 Instance
In this task, we are going to launch an Amazon Elastic Compute Cloud (EC2) instance from a preconfigured Amazon Machine Image (AMI) and connecting to it using Remote Desktop Connection (RDC).- Make sure you are in the US East (N. Virginia) us-east-1 Region.
- Navigate to EC2 by clicking on the Services menu in the top, then click on EC2 in the Compute section.
- Click on Instances from the left sidebar and then click on Launch instances

- Name : Enter MyEC2Server
- Select “Windows” under the “Quick Start” section.
- Click on the search option and search “Microsoft Windows Server 2022 Base” image for the instance.
- For Instance Type: select t2.micro.

-
For Key pair: Select Create a new key pair Button
- Key pair name: MyEC2Key
- Private key file format: .pem
- Select Create key pair Button.
-
In Network Settings, Click on Edit:
- Auto-assign public IP: Enable
- Select Create security group
-
Security group name : Enter whizlabs_SG
-
To add RDP:
- Choose Type: RDP
- Source: Anywhere
-
To add RDP:
- Click on the “Launch Instance” button to launch the EC2 instance. Wait for the instance to be launched and initialized, which can take a few minutes.

- Once the instance is running, select it from the instances list and note the IPv4 Public IP Address of the EC2 instance.

Task 3: Connecting EC2 Instance with Remote Desktop Connection
In this task, we are going to remotely access the Windows Server running on the EC2 Instance using RDP. This allows you to manage the server and its resources from a remote location, which can be useful in many scenarios.- Select your EC2 Instance, click on Connect, and then click on RDP Client in the next screen. This will download a remote desktop file on your local machine.

-
Click on Download remote desktop file. This will help you download the RDP file that will enable you to connect to the Windows Server.

- Click on Get password to retrieve the password required to log in to the Windows Server. The password is encrypted with the Key Pair associated with the EC2 Instance.
-
The Key Pair associated with your Instance will be shown.

- Decrypt the password by uploading the Key Pair that you downloaded in Task 2. This will display the username and password required to access the Windows Server.

- Username and Password will be shown on the Dialog Box. Make sure you record these somewhere for later use.

- Make sure you already have a Remote Desktop application on your computer.
-
Go to your download file and click to open.

- Paste the copied password here. This will start the instance and connect you to the Windows Server.

-
You may get a warning regarding the security certificate while connecting to the instance. Choose Yes or Continue to continue if you trust the certificate.

- Once you are connected, you can find the Public IP, Private IP, RAM, etc. in the top-right corner of the window. This information can be useful to manage the EC2 Instance.

Note : For mac users follow below steps.
- Double-click on the downloaded rdp file

- It will prompt a pop-up to add credentials, give your decripted password.

- Click on the Continue button and again click on Continue. It will redirect to Windows Server.

Task 4: Installing IIS server using Command Line
In this step, we are going is to install the Internet Information Services (IIS) server on the Windows Server. IIS is a web server software that enables hosting of websites and web applications on the Windows operating system. By installing IIS, we can create and launch web pages using the Windows Server.- Click on the Windows Start button in the bottom left corner and type cmd.
-
Right-click on the command prompt and select run as administrator.

-
Type the command and hit Enter.
-
Once the progress is 100%, you will see a message, “The operation completed successfully.”

-
Close the command prompt and click on the Start button again and type IIS, now you will be seeing the Internet Information Services Manager installed successfully.

Task 5: Testing the default Web Page
In this step, we will try to verify that the IIS server is up and running, and it is serving web pages correctly. By browsing the default web page, we can confirm that the IIS server is ready to host our own web pages and applications.- Click on the Internet Information services Manager.
-
Under the Connections page, double-click on the first name you see under Start Page to expand it. Then, double-click on Sites to see the list of available websites.

- Click on Default Web Site and on the right side of the panel, under the Browse Website section, click on the Browse *:80 (http) link
- You will be redirected to a default web page, and you can see the web address of the default web page (localhost) in the address bar of your browser.
-
This ensures that the IIS server is working properly, and you can access the default web page.

Task 6: Creating a Custom Web Page
In this task, we are going to demonstrate how to create a custom web page and host it on the IIS server. By creating a custom web page, we can display any content we want on our website. This task helps in understanding the process of creating an HTML file, saving it to the appropriate directory, and accessing it through the webserver.- Type notepad in the search bar near the Start button and right click on it and select run as administrator.
- Copy and paste the provided HTML code into Notepad to create a custom web page. <html> <body> <h1>Hello Whizlabs User!</h1> <h2>You have successfully created a custom web page.</h2> </body> </html>
- Save the file as “index.html” with the file type set to “All Files”.
- Now for the destination, navigate to the “inetpub” folder on the C drive and open the “wwwroot” folder.
- Save the “index.html” file in the “wwwroot” folder.

- Open a web browser and navigate to the default web page of the IIS web server.
- Refresh the page to see the custom web page displayed instead.

Do you Know?
Amazon provides a free RDP client called “Amazon WorkSpaces” that can be used to connect to Windows-based EC2 instances. This client provides a secure and reliable way to access your EC2 instances remotely from anywhere, using any device with an internet connection.
Task 7: Validation Test
- Once the lab steps are completed, please click on the Check my work button on the right side panel.
- This will validate the resources in the AWS account and shows you whether you have completed this lab successfully or not.
-
Sample output :

Completion and conclusion
- You have successfully created and launched a Windows EC2 Instance.
- You have successfully connected to the Windows Server Using Remote Desktop Connection.
End lab
- Sign out of the AWS Account.
- You have successfully completed the lab.
- Once you have completed the steps, click on End lab in the IP Lab Portal.
What gets checked
When you press Check my work, the platform verifies each of these:- Launch an EC2 Instance — Check whether an EC2 Instance is launched or not.
- Launch EC2 AMI type windows — Check whether the EC2 instance is launched using an Windows AMI.