AWS EC2 Instance Stop and Start IP Address Changed

0

One of my EC2 Instance Stop and Start but after start instance ip address changed by which all urls of website stopped. My Data loggers using old ip address. Is there any solutions for getting old ip address again or any way to change this ip address to old one.

asked a year ago2867 views
1 Answer
3

This is expected behavior in EC2. Public IPs are released when an instance is stopped and a new one is assigned when you start it again. The IP is assigned at random from a pool and you can't specify the public IP you want. Because of this, unfortunately it's not possible to reuse the same public IP you had before. If you want to keep the same IP, assign an Elastic IP to your instance.

The private IP of the instance on the other hand will stay the same until you terminate the instance. You can also assign a private secondary IP address to your instance, which you can reuse but limited to within the CIDR block of your VPC.

Chamal
answered a year ago
profile pictureAWS
EXPERT
reviewed a year ago
profile pictureAWS
EXPERT
Toni_S
reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions