When you have an AWS EC2 instance, Amazon give you a public ip, but for obvious reasons, this is not an static IP for you, is just one IP for a while after you restar the server or may be another temporal event.
So, when amazon give a new public ip for your EC2 instance, the places where you have configured the old public IP should be changed. For example, Filezila for SFTP or may be Robomongo to access to you MongoDB on EC2… wharever
In this context, the “elastic IP” is raised how a new option: if you use it, you will be able to reach you VPC instance on AWS EC2.
Config Elastic IP
We go the console on AWS
We allocate a new elastic IP
we associate it to the VM instance
we have more info in the official documentation, but I am not reading it in depth for this test
Amazon EC2 Instance IP Addressing - Amazon Elastic Compute Cloud
Learn how Amazon EC2 provides your instances with public and private IP addresses and DNS hostnames depending on…
Note the observation
“If you associate an Elastic IP address with your instance, your current Elastic IP address is released.”
We start our NodeJS App and it is ready on the elastic IP
Also, robomongo is able to connect to MongoDB en AWS EC2 with the Elastic IP
We finish the post here with our elastic IP configured on AWS EC2