I want to publicly host my website using IIS on an Amazon Elastic Compute Cloud (Amazon EC2) Windows instance. How can I do this?
You can run your EC2 instance as a web server, host the web application on Internet Information Services (IIS), and then access it on the Internet.
Follow these instructions to verify that your security groups have the required ports open, configure IIS and your website, and then assign a static public IP address to your host name.
Note: You can also host multiple websites on the same IIS server. For more information, see How do I host multiple public websites using IIS on the same Windows Server EC2 instance?
Open the required ports and configure IIS
- Connect to your EC2 Windows Server instance using RDP.
- Follow the instructions at Tutorial: Installing a WIMP Server on an Amazon EC2 Instance Running Windows Server to be sure that the instance has the required ports open, and that IIS is installed and configured on the instance.
- Open the EC2 console, select your instance, choose the Description tab, and note the Public IP address.
Configure your website and confirm that you can access it locally and externally
- On your Windows Server instance, open IIS Manager.
- Expand Sites, choose Default Web Site, choose Explore, and then choose the website .html home page.
- Be sure that you can access the website locally.
- Type your Public IP address in a browser and confirm that you can access the website externally.
Access your website from a host name using a static public Elastic IP address
Note: When you start and stop an EC2 instance, the public IP address changes.
- Open the EC2 console and then choose Elastic IPs from the navigation pane.
- Choose Allocate new address, Allocate, and then choose Close.
- Open Actions, and then choose Associate Address.
- Open Instance, choose your Instance ID, and then choose Associate.
Assign the IP to your domain name in Route 53
- Open the Amazon Route 53 console and then choose Hosted zones from the navigation pane.
- Choose the Domain Name, and then choose Create Record Set, or edit one of the existing A records.
- In the Value field, type your Public IP address, and then choose Save Record Set.