Deploying a Simple Website on IIS Using a Windows EC2 Instance.

Shankar ChavhanShankar Chavhan
2 min read

Step-1: Navigate to EC2 Dashboard

Step-2: Launch an Instance

Step-3: Choose an Amazon Machine Image (AMI)

Step-4: Select an Instance type

Step-5: Create a Key Pair

Step-6: Network Settings

Step-7: Create a Security Group

  • Create a new security group or select an existing one.

  • Add a rule to allow HTTP port (80) and RDP (3389) access.

Step-8: Configure Storage

Step-9: Review and Launch Instance

Steps to Connect Windows Server

Step-1: Go to running instance then click on connect RDP client.

  • Click get password

  • Upload your key pair file (.pem)

  • Click Decrypt password and that username (Administrator) and Decrypt password.

Step-2: Initiate the RDP Connection

  • Enter the public DNS (IPv4) or public IP in the computer field.

  • Click OK.

Step-3: Accept Certificate Warning

  • Click yes to accept the certificate warning.

Install IIS on Windows Server

  • Open a Server Manager.

  • Click on Add roles and features.

  • In the Add Roles and Features Wizard, select roles-based or feature-based installation.

  • Select your instance and click next.

  • On the select server roles page, check the box for web server (IIS). Add the required features when prompted.

  • Click next through the wizard until you reach the install button, and then click install.

Host a Simple Website on IIS

  • Navigate to the default IIS directory: C:\inetpub\wwwroot

  • Create a simple HTML file: for example, create a file named index.html with the following content.

<!DOCTYPE html>
<html>
<head>
    <title>My Simple Website</title>
</head>
<body>
    <h1>Hello World!</h1>
    <p>Welcome to my sample website hosted on IIS</p>
</body>
</html>
  • Save the index.html file in C:\inetpub\wwwroot directory.

Access your Website :) !

  • Open a web browser and navigate to the public IP address of your EC2 instance.

  • You should see your simple website displaying the content of the index.html file.

Here is my Website Output :) !

Conclusion

In this project, we successfully set up a Windows EC2 instance on AWS and hosted a simple website using Internet Information Services (IIS).

1
Subscribe to my newsletter

Read articles from Shankar Chavhan directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Shankar Chavhan
Shankar Chavhan

I'm a Cloud DevOps Engineer passionate about automating infrastructure and enhancing development workflows. Experienced in AWS, Docker, Kubernetes, and CI/CD pipelines, I focus on creating efficient, scalable, and secure cloud solutions. I enjoy teaching AWS and sharing insights on DevOps practices. Follow my blog for tips on cloud computing and DevOps tools.