Hi Dears,
In this article, we will see Create IIS Web Server On Windows EC2 Instance By Using Bootstrap Script.
Steps to Follow:
- Logging to AWS Account
- Create Web Server By Using Bootstrap Commands
- Verify content of Web Server in Browser
1. Logging to AWS Account
First, we need to AWS Console page by using below link.
https://aws.amazon.com/console/
Click on sign in to Console button.
Logging to aws account
Login using username & password and click on sign in.
Enter to AWS Management Console
We can see the AWS Management Console Dashboard.
Go to Services, under the compute module click EC2 service to open.
2. Create Web Server By Using Bootstrap Script
Go to Services, under the compute module click EC2 service to open.
Click on Launch Instance.
Choose an Amazon Machine Image (AMI)
Select the Operating system of the EC2 instance by choosing any of the Amazon Machine Images (AMI). Select the Microsoft Windows Server.
Choose an Instance type
Choose the Type of instance depending on your requirements.
Instance types comprise of varying combinations of CPU, memory, storage, and networking capacity.
select the default option of t2. micro – this instance type is covered within the free tier. Then click on Configure Instance Details.
Configure Instance Details
Configure EC2 instance details as per requirements of your environment and click on Add Storage.
Choose the Type of instance depending on your requirements.
Instance types comprise of varying combinations of CPU, memory, storage, and networking capacity so you can choose the appropriate mix for your applications.
select the default option of t2.micro – this instance type is covered within the free tier. Then click on Configure Instance Details.
Go to Advanced Details and type commands for bootstrapping in user data.
The Script is
1 2 3 4 |
<powershell> Install-WindowsFeature -name Web-Server -IncludeManagementTools New-Item -Path C:\inetpub\wwwroot\index.html -ItemType File -Value "KTExperts is a knowledge Sharing Platform" -Force </powershell> |
Click on Add Storage.
Add Storage
Here, we can see root volume by default and size of 8GB
Add a new volume if required
Click on Add Tags.
Add Tags
Tags assist in easier identification and classification of the various instances in your AWS environment.
Click on click to add a Name tag to provide name for our server.
Provide the name for the ec2 instance for easier understanding and click on Configure Security Groups.
Configure Security Group
A security group allows configuring firewall rules to allow traffic as needed.
RDP Is enough to connect to our Windows Server and HTTP is for accessing Web Server and click on Review and Launch.
Review Instance Launch
Review and confirm the configuration of the instance. Click on the Edit button on each configuration item to make changes and click on Launch.
Choose existing Key Pair and Launch Your Instance
To connect to your webserver, you need a key pair. A key pair is used to log into your instance and select existing key pair.
click on View Instances to view the instance you have just created and see its status.
We can see the instance “Web Server” has been created successfully.
3. Verify content of Web Server in Browser
Copy public IP of webserver as shown below.
Search Public IP of Web Server which was copied.
Thank you for giving your valuable time to read the above information.
Follow us on
Website : www.ktexperts.com
Facebook Page : KTexperts
Linkedin Page : KT EXPERTS
Follow Me
Ramesh’s Linkedin : Ramesh Atchala