Download as pdf or txt
Download as pdf or txt
You are on page 1of 31

Home / AWS / Guided Lab / Create EC2 Instance and Connect to a windows machine using RDC

Create EC2 Instance and Connect to a windows machine using RDC


Level: Fundamental

Amazon EC2 Amazon Web Services

e 0h 29m 6s left
End Lab

Open Console

Validation

Lab Credentials

User Name x Bảo mật - Điều


khoản
Whiz_User_65518.21872198 w
Password x
42dbffe7-b164-4005-8937-659e5fd48167 w
Access Key x
AKIA5QO2XLSFFU33JCH7 w
Secret Key x
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 w
Lab Resources

No Lab Resources Found

Support Documents

1. FAQs and Troubleshooting

Need help?

How to use Hands on Lab


Troubleshooting Lab

FAQs

Submit Feedback Share

Lab Overview Lab Steps Lab FAQs

Cloud Administrator 

Compute 

Lab Steps
Task 1: Sign in to AWS Management Console

1. Click on the Open Console button, and you will get redirected to AWS Console in a new browser tab.

2. 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.
3. Once Signed In to the AWS Management Console, make the default AWS Region as US East (N. Virginia) us-
east-1.

Note : If you face any issues, please go through FAQs and Troubleshooting for Labs.

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).

1. Make sure you are in the US East (N. Virginia) us-east-1 Region.

2. Navigate to EC2 by clicking on the Services menu in the top, then click on EC2 in the Compute section.

3. Click on Instances from the left sidebar and then click on Launch instances

          
4. Name : Enter MyEC2Server

5. Select "Windows" under the "Quick Start" section.

6. Select the "Microsoft Windows Server 2022 Base" image for the instance.

7. For Instance Type: select t2.micro

     

8. For Key pair: Select Create a new key pair Button


Key pair name: MyEC2Key

Private key file format: .pem

9. Select Create key pair Button.

10.  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

11. 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.
12. 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.

1. 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.
                                    

2. Click on Download remote desktop file. This will help you download the RDP file that will enable you to
connect to the Windows Server.
               
3. 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.

4. The Key Pair associated with your Instance will be shown.


                  
5. 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.
A
                                        
6. Username and Password will be shown on the Dialog Box. Make sure you record these somewhere for later
use.

                      

7. Make sure you already have a Remote Desktop application on your computer.

8. Go to your download file and click to open.

                   

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

10. 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.
                                

11. 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.
       

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.

1. Click on the Windows Start button in the bottom left corner and type cmd.

2. Right-click on the command prompt and select run as administrator.


                              
3. Type the command and hit Enter.

DISM /online /enable-feature /featureName:IIS-DefaultDocument /All


w
4. Once the progress is 100%, you will see a message, “The operation completed successfully.”

              

5. 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.

1. Click on the Internet Information services Manager.

2. 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.

          

3. 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
4. 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.

5. 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.

1. Type notepad in the search bar near the Start button and right click on it and select run as administrator.

2. Copy and paste the provided HTML code into Notepad to create a custom web page.

<html>
  <body>
w
    <h1>Hello Whizlabs User!</h1>
    <h2>You have successfully created a custom web page.</h2>
  </body>
</html>

3. Save the file as "index.html" with the file type set to "All Files".

4. Now for the destination, navigate to the "inetpub" folder on the C drive and open the "wwwroot" folder.

5. Save the "index.html" file in the "wwwroot" folder.


                                      
6. Open a web browser and navigate to the default web page of the IIS web server.

7. 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

1. Once the lab steps are completed, please click on the Validation button on the left side panel.

2. This will validate the resources in the AWS account and shows you whether you have completed this
lab successfully or not.

3. Sample output :

           

    
Completion and Conclusion
1. You have successfully created and launched a Windows EC2 Instance.

2. You have successfully connected to the Windows Server Using Remote Desktop Connection.

End Lab
1. Sign out of the AWS Account.

2. You have successfully completed the lab.

3. Once you have completed the steps, click on End lab from your whizlabs dashboard.

About Us Instructions and Guidelines FAQ’s Contact Us

© 2023, Whizlabs Education INC. a f h

You might also like