AWS EC2 Instance with Windows Server IIS Web Server

This article explains how to launch a Microsoft Windows AWS EC2 instance, deploy a WISA (Windows, IIS, SQL Server, and ASP.NET) stack with a default website, and map the server with a domain registered with GoDaddy.

Create an EC2 Windows Server Instance

  1. Open the AWS EC2 Management Console
  2. Click Launch Instance
  3. Select a Microsoft Windows Server instance (you may want to start with one that is “free tier eligible”)
  4. Choose an instance type
  5. Since we are launching a simple instance, you may skip all the steps and click Review and Launch
  6. In the Review Instance Launch page click Launch
  7. Select an existing key pair or create a new key pair

    Note: If you create a new key pair, AWS will generate a new private key (.pem file) to be downloaded to your computer. This file is essential in order to connect to the instance. If you lose the file, you may never be able to connect to that instance and you may need to terminate it a recreate a new one.
  8. Click Launch Instances
  9. Click View Instances to open the EC2 Management Console

    Note: The instance may take a few minutes to start up. You can give the instance a name (for example, the type of machine).
  10. Once the instance is up and running, you have to set up inbound rules in order to make it publicly available. In the Description tab, click the security group that was automatically generate during the creation of the instance.

    Note: You may specify the security group and inbound rules before launching the instance.
  11. In the Inbound tab, click Edit to add new rules
  12. You should have an SSH rule already create by default (this allows you to connect via the Secure Shell protocol). Add a rule for HTTP and HTTPS, both with Source set to “Anywhere” (or “0.0.0.0/0” and “::/0”)
  13. The instance is now publicly accessible. The public IP address can be found in the EC2 Management Console in the Description tab

Note: Public IPv4 addresses are reallocated each time you stop or restart an instance. To make the IP address persistent, use Elastic IPs to allocate a static address and associate it with your EC2 instance.

Connect

You can connect to a Windows Server machine using the Remote Desktop Connect.

  1. In the EC2 Management Console, click Connect
  2. In the Connect To Your Instance popup, click Download Remote Desktop File to download the RDP file, already preconfigured for your EC2 instance.
  3. In the same popup, click Get Password to obtain the authentication password.
  4. Load your private key and click Decrypt Password. The password will then be visible in your screen.
  5. Launch the RDP file and use the password to authenticate the access.
  6. You are now connected to your Windows Server machine.

Internet Information Services (IIS)

Internet Information Services (IIS) is an extensible web server created by Microsoft and available in Windows machines. IIS may or may not be enabled by default in the Windows Server EC2 instance.

  1. In order to enable IIS, launch Server Manager and select Manage > Add Roles and Feature
  2. In the Add Roles and Features Wizard, Server Roles page, find and check “Web Server (IIS)”
  3. In the Roles Services for Web Server Role (IIS), check the desired options to be include in the installation
  4. Confirm the installation

    Note: The installation may take several minutes.
  5. Once the installation is completed, you should be able to find the Internet Information Services (IIS) Manager in the Administrative Tools
  6. If everything is installed correctly, you should be able to enter the IP address of your EC2 instance in any web browser, and see the IIS default page

Connect EC2 Instance to GoDaddy Domain

Follow these instructions to connect your EC2 instance to a GoDaddy domain. Once mapped, you should be reaching the same IIS default from either the public IP address or your domain.

ASP.NET Web Site

Follow this tutorial to create a simple “Hello World” ASP.NET web site and deploy it to IIS.

Comments are closed.