DEV Community

Cover image for Creating a Windows EC2 Instance on AWS and Installing IIS Server on it

Creating a Windows EC2 Instance on AWS and Installing IIS Server on it

Amazon Web Services (AWS) provides one of the most robust and versatile cloud platforms, allowing organizations and individuals to deploy scalable and secure solutions. Of all the features AWS offers, Elastic Compute Cloud (EC2) stands out as a powerful tool for launching and managing virtual servers. In this guide, I'll walk you through creating a Windows EC2 instance and setting it up as a web server using Internet Information Services (IIS). Whether you're a cloud computing beginner or looking to expand your AWS skills, this tutorial will provide you with a hands-on approach to building a web server on the AWS cloud.

EC2 instance

Let's dive into the steps!


Step-by-Step Guide to Creating the Windows EC2 in AWS and installing the IIS server on it

1: Create an AWS Free-Tier Account

  • Click here to navigate AWS and sign up for a free-tier account today.

Sign up

You can watch this Youtube video where the YouTuber demonstrates in details.

2: Login to AWS Account

  • Sign in to the AWS account as Root user with your credentials (Mail and Password).

Sign in

3: Search and select EC2 Instance

  • After signing in successfully, search EC2 in the search bar and select the first option.
    Search EC2

  • Click launch instance.
    launch instance

4: Configure the EC2 Instance

  • Give the EC2 instance a name.
  • We can also add additional tags like department, city, e.t.c. (optional).
    Name & tags

  • Select Windows as the AMI (Amazon Machine Image).
    Amazon Machine Image

  • Select t3.micro as the instance type.

  • Click Create a new key pair, give it a name and Create.
    Type and key pair
    Key pair

  • It gets downloaded automatically on the computer.
    Key pair download

  • In the Network settings, select HTTP so the IP can be accessible on the web.
    Network settings

  • We can also change the storage assigned and the region from the top right corner.

  • Leave all other things as default and launch instance.
    Storage & Region

5: Connect to the EC2 Instance

  • Open the instance from the ID.
    Open instance

  • Select the instance created and click Connect. The instance state should indicate Running.
    Connect & Instance state

  • Select RDP client section and click Get password.
    RDP client

  • Upload the key pair downloaded earlier, then click Decrypt password.
    Upload the key pair

  • Copy the password, then download the Remote desktop file.
    Remote desktop file

  • Open the RDP file and connect
    Open RDP
    Connect

  • Enter the password copied from earlier.
    Password
    EC2 instance
    EC2 instance

6: Install Internet Information Services (IIS) server

  • Search Powershell in the EC2 instance and Run as administrator
    Powershell

  • Enter the command below in the Windows PowerShell to install the IIS server.

Install-WindowsFeature -Name Web-Server -IncludeManagementTools
Enter fullscreen mode Exit fullscreen mode

Install the IIS server

  • Wait for the server to install completely.
    Installing
    Success

  • Copy the Public IP address and open in a browser, and we should see the Windows Server.
    Public IP address
    Windows Server

  • Note: If you are having trouble opening the IP in the bowser, go to settings in the instance and navigate Edit Inbound rules, and make sure the HTTP is associated with the IP.
    In case

Conclusion

By following the steps outlined in this article, youโ€™ve successfully launched a Windows EC2 instance on AWS and installed the IIS web server on it. Our setup not only demonstrates the power and flexibility of AWS but also serves as a foundation for hosting web applications in the cloud. With your IIS server up and running, youโ€™re ready to explore further configurations, deploy websites, or scale your instance to meet growing demands.


Thank you for reading my blog.๐Ÿ˜Š๐Ÿ˜Š

If you need further assistance, feel free to reach out in the comment or hit me up on Twitter. You can also follow me on GitHub. My DM's are open and love discussions on cloud topics!๐Ÿ˜

: Oluwatofunmi Emmanuel Oluwaloseyi

Top comments (0)