Elastic IP
Each time an EC2 Instance stops, it looses the IP and will create a new one each time you will restart the instance.
If you have a DNS entry pointing to your server, it will no longer be correct and the access to your server will be lost.
In order not to loose the access to your server, we have to fix the IP and have always the same IP associated with our EC2 instance.
For obtaining that, we have to go to “Elastic IPs” menu option and:
- Press “Allocate New Address”. It will allocate a fixed IP for your future use.
- Choose where you will use the IP, in our case it will be EC2.
- Select the new IP on the list and press “Associate Address”,
- Choose the Instance where you will use the IP.
From that moment on, when you will restart the instance, it will have always the same IP.