DEV Community

Cover image for How to Setup A Windows Virtual Machine using AWS Management Console
Moyinoluwa Adenuga
Moyinoluwa Adenuga

Posted on

How to Setup A Windows Virtual Machine using AWS Management Console

Setting up a virtual machine is one of the first skills learned when learning about the cloud. It is very important as it is the foundation of cloud computing. A virtual machine or server is usually referred to as an instance and they are used interchangeably. Amazon Elastic Compute Cloud (EC2) is the service which provides scalable computing capacity in the Amazon Web Services (AWS) Cloud. Amazon EC2 is used to launch as many or as few virtual servers as needed, configure security and networking, and manage storage.

Prerequisites: You should have an AWS account or register here to create an account.

Launching An Instance

  1. When signed in to the AWS console, search and select EC2.
    AWS Management Console Search

  2. From the EC2 console dashboard, select the Launch Instance from the Launch Instance Dropdown to create a virtual server.
    AWS EC2 Console Dashboard

  3. Enter a descriptive name for the instance.
    Launching an instance - Name

  4. Under Application and OS Images (Amazon Machine Image), select Windows as this is the desired operating system (OS) we are setting up for the instance.
    For the Amazon Machine Image (AMI), we can stick with the default which is Free tier eligible. An Amazon Machine Image (AMI) is a basic configuration that serves as a template for the instance.
    Launching an instance - Application and OS Images

  5. The instance type is usually used to set the hardware configurations of the instance such as storage capacity, storage type(ssd or hdd), CPU, memory or network performance. We would just leave this as default.
    Launching an instance - Instance Type

  6. Under Key pair, create a key pair or use a previously created one. This allows a secure connection to the instance and is a step that should not be skipped as one would not be able to connect to the instance without it. A file gets downloaded on creation of the key pair.
    Launching an instance - Key pair

  7. Keep the default selections for other configurations, review the summary of the configurations and launch the instance.

  8. Once successfully launched, we are able to see it running on the EC2 dashboard. More information of the instance can be viewed by clicking it.
    AWS EC2 Instance Running

Connecting to the Launched Instance

  1. Select the instance and click the connect button
    Connecting to an Instance

  2. Navigate to the RDP Client tab and download Remote desktop file.
    Connecting to an Instance using the RDP Client

  3. Generate password by uploading the key pair file and decrypt password. Copy the generated password as this password would be used to connect with the remote client.
    Generating Password using Key Pair file

  4. Open the Remote Desktop file with a suitable application. I used the Microsoft Remote Desktop App from App Store. Enter the password generated in step 3 and the virtual instance is started.
    Entering password to connect to Remote Desktop

On getting this prompt, click continue
RDP Connection Prompt
AWS Windows Virtual Instance
AWS Windows Virtual Instance

Feel free to also perform some actions. I browsed and also confirmed the storage was 30gb.
Browsing in the Virtual Instance
Storage of Virtual Instance

Terminating the Instance

Once done with an instance, it should be terminated as resources not needed should not be left running as it incurs costs.

  1. Select the instance and Choose Terminate instance in the Instance state dropdown.
    AWS EC2 Instance termination

  2. Choose Terminate when prompted for confirmation.
    Modal to Confirm AWS EC2 Instance termination
    Instance showing terminated state

After the instance is terminated, it remains visible on the console for a short while before being removed from the console.

Top comments (0)