Home > OS >  AWS EC2 Rescue - Get old Public DNS back
AWS EC2 Rescue - Get old Public DNS back

Time:11-01

I ran the rescue program to generate a new private key for my AWS EC2 instance. There seems to be a new instance with the same old instance-id but a new public DNS. Is there a way I can get back to my old public DNS? Everything I had was written to call the old public DNS (server name url) .... Thank you. (AWS documentation is very hard to follow.)

CodePudding user response:

The only way to 'keep' a public IP address is to create an Elastic IP. This is a static IP address that is associated with your AWS Account and can be assigned to an Amazon EC2 instance.

Typically, it is best to avoid requiring a specific IP address. This can be done by using a DNS name that resolves to an IP address, thereby allowing the IP address to change.

However, sometimes people need a static IP address for whitelisting (eg calling an API from a 'known' IP address). Elastic IPs are available for this purpose.

  • Related