Deploying Website over EC2 server Windows

To deploy your website over EC2 instance follow the steps below.

Step 1: Create VPC

1. In the AWS Management Console on Services menu, select Network & Content Delivery and then click on VPC

2. Now,  you are on VPC Dashboard, click on Create VPC

3. In VPC setting, under Resources to create, choose VPC only.

4. Under Name tag, write a name and Under CIDR write 10.0.0.0/24 (Keep it defaut).

5. Leaving rest of the things as it is click on Create VPC button Below.

5. Leaving rest of the settings as it is click on Create VPC button below.

6. Click on Your VPCs, now you can see the VPC you have created right now.

Step 2: Create Subnets

1. Subnet is under Virtual Private Cloud. Click on it.

3. Now,  at the right click Create Subnet.

3. Now,  at the right click Create Subnet.

4. In Create subnet, choose your VPC from the dropdown.

5. Give a subnet name, choose one Availability Zone, in IPv4 CIDR block write 10.0.0.0/24 (Keep is default).

6. keeping all other settings as it is click on Create subnet button.

7. You can now check your created subnet from VPC dashboard, on clicking on subnets.

Step 3: Create Internet Gateway

1. Under Virtual Private Cloud on VPC dasboard, Click on Internet gateways from the left side.

2. Now, click on Create Internet gateway button from the right side.

3. Give  a name in Internet gateway settings and click on Create internet gateway.

4. Now, the internet gateway is also created.

5. This internet gateway should be attched with the VPC we have created. So, click on actions and click Attach from the dropdown.

6. Choose the VPC and click on Attach internet gateway button.

Step 3: Create Route Table

1. Under Virtual Private Cloud on VPC dasboard, Click on Route Tables from the left side.

2. Now, click on Create Route Table button from the right side.

3. Give  a name in Route table settings, choose your VPC from the dropdown and click on Create route table.

4. Now, the route table is create, select the route table and below select Routes and click on Edit routes button.

5. In Edit routes, click on Add routes button.

6. Here now add Destination as 0.0.0.0/0 and Target as Internet Gateway, then click on Save changes.

7. Now we need to edit subnet association, so select Subnet association from the tab and click on the Edit subnet association button.

8. In Available subnet, select the subnet that was created and click Save association. 

Step 4: Create Security Group

1. Under Security on VPC dasboard, Click on Security Groups from the left side.

2. Now, click on Create Security Group button from the right side.

3. Write a Security group name,  Description and choose VPC from the dropdown.

4. In Inbond rules add 4 rules.

5. In type choose RPD, SSH, HTTP, HTTPS and in source select Anywhere IPv4.

6. Finally click on Create security group button. 

Step 5: Create Key Pair