Why it isn’t re-assigned a public IP address and public IP DNS for a Instance in a public subnet after stopped and started in case of attached 2 eni.

0

Problem Description: It isn’t re-assigned a public IP address and public IP DNS for a Instance in a public subnet after stopped and started in case of attached 2 eni.

Symptom with screenshot

Step 1. Initialized Instance

Initialized Instance - EC2 Dashboard

Initialized Instance -Instance Summary

Successful SSH connection

Step 2. Stopped Instance

Stopped Instance - EC2 Dashboard

Stopped Instance - Instance Summary

Step 3. Re-Started Instance

Re-Started Instance : Not shown Public IP address and DNS - EC2 Dashboard

Re-Started Instance : Not shown Public IP address and DNS -Instance Summary

Step 4. Rebooted Instance

Rebooted Instance : Still not shown Public IP address and DNS - EC2 Dashboard

Rebooted Instance : Still not shown Public IP address and DNS - Instance Summary

Question #1. Is that normal?

Question #2. Why it isn’t re-assigned a public IP address and public IP DNS with this case

Question #3. How I can prevent with re-assigned public IP address and public IP DNS with this this case

Felix
gefragt vor 2 Jahren295 Aufrufe
1 Antwort
1
Akzeptierte Antwort

See below 2 points from the documentation; what you are seeing is expected behavior. You can use Elastic IP instead of Public IP if you want persistent behavior.

  • We release your instance's public IP address when it is stopped, hibernated, or terminated. Your stopped or hibernated instance receives a new public IP address when it is started.

  • You cannot auto-assign a public IP address if you specify more than one network interface. Additionally, you cannot override the subnet setting using the auto-assign public IP feature if you specify an existing network interface for eth0.

profile pictureAWS
EXPERTE
beantwortet vor 2 Jahren
profile pictureAWS
EXPERTE
Chris_G
überprüft vor 2 Jahren
  • Thank you for your answers. Can I ask 2 more questions from your answers?

    1. Why it can't be auto-assigned a public IP address in case of 2 more eni on an instance

    2. Do you mean it will keep the elastic IP on the primary eni although it has 2 more eni?

  • Think of Public IP as ephemeral entity (temp) if you want persistent IP use Elastic IP which you can attach/detach to any of the ENI on-demand.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen