Hosting Your Website: Launching AWS EC2 Instance with Windows
Easy Steps to Install Windows Server on AWS EC2 for Website Hosting
Open the AWS Console using the link aws.amazon.com/console.
Click on Sign In to the Console.
After signing up search EC2 in the search bar.
Click on EC2. This window will open up.
Scroll down and Click on Launch Instances.
Give a suitable name for the instance.
Select Windows under Application and OS Images (Amazon Machine Image).
Scroll down to the Key pair.
Click on Create new key pair.
Enter the key name, Select Key pair type RSA click on .pem under Private key file format then click on Create key pair.
The key file will start downloading.
Enable Allow HTTPS traffic from the internet, Allow HTTP traffic from the internet, and Allow RDP traffic from under network setting.
Scroll down and click on Launch Instance.
Click on the instance from the left panel of the EC2 window.
Wait for 4–5 mins until the instance state is notrunning and the Status check is not 2/2 checks passed.
Select the instance then click on Connect.
Go to RDP client.
Click on Download remote desktop file.
Then scroll down and click on Get Password.
Click on Upload private key file.
Then upload the key pair file that was created previously.
Scroll down and click on Decrypt password.
A password will appear under the RDP client.
Copy this password.
Open the .rdp file downloaded previously.
Click connect, paste the password, and click yes. The remote desktop will open up.
Click on the start button.
Open Server Manager.
Wait for 4–5 minutes until the setup is complete.
Click on add roles and features.
Click on the next 3 times.
Now, scroll down and select Web Server (IIS), then click on Add Feature.
Now click the next 4 times and then install.
Wait until the installation is finished.
Close the server manager when installation is complete.
Open File Explorer and go to This PC.
Open Local Disk(C:) -> inetpub -> wwwroot.
Delete all files present in wwwroot.
Create a text file and write something on it.
Press Ctrl + Shift + S, then enter the file name as index.html and select All Files from the Save as type dropdown. Then click save.
Go back to the instance on the AWS console.
Copy the Public IPv4 address of the instance.
Paste it on the browser, and you will see the text you wrote in the index.html file.
To terminate the instance select the instance click on instance state and then click on terminate.