DEV Community

Cover image for Creating an EC2 Instance on AWS and Installing IIS server on it
Adebayo Ebofin
Adebayo Ebofin

Posted on

Creating an EC2 Instance on AWS and Installing IIS server on it

Table of content

  1. What is AWS?
  2. What is EC2?
  3. What is IIS?
  4. Step-by-step guide to create an Amazon EC2 instance and install IIS (Internet Information Services) on it (a) Log in / sign up to AWS Management console (b) Connect to Instance (c) Install IIS on the Instance (d) Verify IIS installation

What is AWS?
Amazon Web Services (AWS) is a comprehensive cloud computing platform offered by Amazon. It provides a wide range of cloud-based services, including compute power, storage, databases, machine learning, networking, and more, designed to help businesses build, deploy, and scale applications efficiently and cost-effectively.

What is EC2?
Amazon EC2 (Elastic Compute Cloud) is a service provided by Amazon Web Services (AWS) that offers scalable virtual servers in the cloud. EC2 enables users to run applications and workloads on virtual machines with customizable configurations of CPU, memory, storage, and networking.

What is IIS?
IIS (Internet Information Services) is a web server software developed by Microsoft for hosting websites, applications, and services. It runs on the Windows operating system and is used to serve both static content, like HTML files, and dynamic content, such as ASP.NET applications.

Here is a step-by-step guide to create an Amazon EC2 instance and install IIS (Internet Information Services) on it:

a. Log in/sign up to AWS Management console

  • Log in to AWS Management Console by typing your email and password

Image description

  • In the AWS Console, search for and select EC2 under Services.

Image description
*Launch an Instance:
Click on Launch Instance.

Image description
*Give the EC2 a name( I choose crown)

Image description
*Add a tag
Image description
*Select region for your EC2 Instance (I choose us-west 2)

Image description
*Choose an Amazon Machine Image (AMI):

Select a Windows-based AMI from the drop down (e.g., Microsoft Windows Server 2025, Microsoft windows server 2025 core Base, Microsoft Windows Server 2022 Base or Microsoft window server 2025 Base).((I choose Microsoft Window Server 2025 Base)

Image description
Choose an Instance Type:

*Select an instance type (e.g., t3.micro for free tier-eligible).

Image description
*Create new key: To create new keypair click create new key, give the keypair a name(I choose instancekeypair),ensure the keypair type RSA is choosen, then click create a key pair and ensure the keypair file is downloaded

Image description
*Configure Security Group:

Create a new security group with the following rules:
RDP Allow you to connect to your instance
HTTP : Allow access for web traffic.

Image description

*Click Launch instance:

Image description

b. Connect to the EC2 Instance

Image description
*Select RDP client tab, click the connect using RDP client and download the remote desktop file (RDP file)

Image description
*Select get password

Image description
*Select upload private key file to upload private key file
Image description

*Select decrypt password

Image description
*Copy password

Image description
*Open the downloaded RDP file, connect by pasting the copied password and click ok

Image description
*Connected

Image description

c. Install IIS on the Instance
*Search for power shell from your desktop and run as administrator

Image description
Run the following command to list all features related to IIS to confirm what is available:
Get-WindowsFeature -Name Web-

Image description
*Enter the command
Install-WindowsFeature -Name Web-Server -IncludeAllSubFeature -IncludeManagementTools
press enter
Image description

Wait for it to finish loading
*Notice the **Exit code
* says successful

Image description
d. Verify IIS Installation
Exit the remote server to AWS management console
On the instance navigate to the public IPv4 address of the instance. Copy IP address

Image description
*Paste the IP address in a new tab on your browser.

Image description

*Press enter and observe the web server that was deployed was successful accessed from the public internet.
Image description

*To ensure you don't run out your credit on AWS, Terminate and delete Instance immediately after usage.

Image description
Image description

Top comments (0)