When you start your EC2 instance, EC2 automatically installs the operating system (Linux or Microsoft Windows). But you will need to install your web-server on the instance.
If you’’re hosting a website or running a web application on an EC2 instance, you can route traffic of your domain to your server using Amazon Route 53.
It is recommended to create an Elastic IP address and associate it with your EC2 instance. An Elastic IP address ensures that the IP address of your Amazon EC2 instance will never change. If you registered the domain name via Amazon Route 53, it will be automatically configured at Amazon Route 53 as the DNS service for the domain.
To configure Amazon Route 53 to route traffic to an EC2 instance, perform the following procedure.
Changes usually propagate to all Amazon Route 53 servers within 60 seconds. When propagation is done, you’’ll be able to route traffic to your EC2 instance using the name of the resource record set that you created in this procedure.
After you have done all the steps above, traffic will be routed to your EC2 instance, however, you need to allow your EC2 instance to receive the http requests as well. You will need to follow the steps below:
Once you have done these steps, your EC2 instance will be able to receive HTTP requests on port 80.
Note: make sure you have selected your desired region from upper right corner of the console
Name: Type the domain name that you want to use to route traffic to your EC2 instance, e.g. www.example.com. The default value is the name of the hosted zone. For example, if the name of the hosted zone is example.com and you want to use www.example.com to route traffic to your EC2 instance, type www.
Type: Choose A-IPv4 Address
Alias: Choose No
TTL (Seconds): Accept the default value (300) or change as you wish
Value: Type the IP address (Public IP or Elastic IP) that you got in P.S.1 above
Routing Policy: Accept the default value simple