Search code examples
amazon-web-servicesamazon-ec2elastic-ip

Will my running EC2 instance drop its current public IP if I associate an Elastic IP to it?


I am running an EC2 instance with a public IP. This IP is not elastic, so if I were to restart the instance, I would lose it.

When I created the instance, I did not know about this, so I configured my domain name to point to that IP as if it were set in stone.

Now I realized that I risk that my app be unreachable if the IP changes after a restart.

What would the correct procedure to assign an Elastic IP to this instance without downtime?


Solution

  • There will be not that much of downtime. it will be a couple of secs. just get the new ElasticIP and point the DNS to new. Or if you want to do without Downtime, Then plan to add Loadbalancer with your instance and point the domain to Loadbalancer. there will be no downtime