Let's say you have set up an EC2 micro instance on AWS. You have set up your IIS, Database, Application and everything, and finally you got your first web site up and running on this instance.
For some reason you needed to restart your instance and after a simple reboot using EC2 Management Console you see that your web site no longer responds & you can not RDP to your instance.
Do you know why this is happening? This is happening because once your instance restarts, it gets a new IP!
To check this, login to EC2 Management Console, click “Running Instances”, then click the instance whose IP you wanna check.
You will see the public DNS info as below:
Here 22.214.171.124 is the new IP of your AWS instance. For your website to work, you should update the zone file of your domain name (update the A Record) -using the administration tools of your domain registerer- with this new IP so that the requests to your website will be directed to this IP.
Also to be able to RDP to this new public DNS, right-click on your instance name in the list of running instances and click “Connect”. A window like below will open:
Click “Download shortcut file” and save the shortcut. Now you can double-click this shortcut to RDP to your instance.
In order to prevent this from ever happening you must allocate an EIP (Elastic IP) and associate this EIP with your instance!
Hope this helps someone.