I am learning amazon AWS and I am sharing my knowledge through these blogs. Today's blog is the most basic one on Aws. we will provision an ec2. after that we will install a webserver on it.
In the upcoming blogs, I will have to configure ec2 several times, so I am writing this blog so that when needed I can refer to this. otherwise, I will end up whiting the steps of provisioning EC2 several time (Almost in every blog)
I have broken the process of provisioning an EC2 into few easy steps. follow them and you will have an EC2 in front of you like magic.
So let's begin(Abrakadabra).
Step 1: After logging in to the AWS console simply select the EC2 from the list of services.
Step2: Then launch an EC2.
Step3: Choose an image for the EC2 from the amazon machine images(AMI) list. I will choose windows server r2 base as it is free tier eligible and a good option for the web servers.
Step 4: Choose the instance type. I am going to choose t2. The reason is the same, it is free tier eligible. After choosing the instance type go to the security group section.
Step 5: Here we add rules and enable HTTP and HTTPS protocol so that the internet could be accessed. now we directly click on review and launch.
Step 6: Add a new security key for secure access to the EC2. Don’t forget to download it.
Step 7: You will have to wait for a while before Amazon sets up your EC2. Once EC2 is ready, now press the connect button to connect with it. and download the remote desktop file.
Step 8: Now to get the password, click on ‘Get password’ and then upload the key pair that you downloaded in step 6, then click on decrypt password. now you can copy it.
Step 9: Open the RDP file that we downloaded in step 7. enter the password and voila you are inside the EC2 that you just created.
Step 10: Once we are inside the EC2, we will install a web server on it. For that open server manager. To install a web server just follow the steps in the pictures below.
Step 11. We are almost done now. The web server is installed now go to my computer of the EC2 and open C drive then open wwwroot file. Here delete the existing file and make a new text file named as an index and save it with a .html extension.
You can add your static website HTML and CSS over here.
We have successfully launched and ec2 and installed web server on it. now you ad your HTML and share the public IP of the ec2 to showcase your HTML page.