Setting an “elastic IP” on AWS EC2

Pablo Ezequiel
Jan 2, 2017 · 3 min read

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.

Let see:

Config Elastic IP

We go the console on AWS

elastic ip option

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

Note the observation

“If you associate an Elastic IP address with your instance, your current Elastic IP address is released.”

Public IP is equal to Elastic IP

Testing IT

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

Pablo Ezequiel

Written by

Dev and Tech. Sharing while I am learning (#cloud, #mobile)

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade