Restoring an EC2 Instance - the Public IP is missing
Hello All. I've successfully performed a restore of an EC2 Instance using AWS Backup, however it does not have a public IP address associated with it, it only has the private IP. I understand that when creating instances you decide whether or not to have a Public IP, however when restoring there were no options for Public IP, and so I assumed it would keep that setting.
What is the proper procedure to restore an EC2 instance and allow it to keep the Public IP setting? Or how do you assign it after the restore?
Thanks Dan
Hi Dan,
The auto-assigned public IP address associated with my Amazon Elastic Compute Cloud (Amazon EC2) instance changes every time you stop and start the instance.
An Elastic IP address is a static public IPv4 address associated with your AWS account in a specific Region. Unlike an auto-assigned public IP address, an Elastic IP address is preserved after you stop and start your instance in a virtual private cloud (VPC).
https://aws.amazon.com/premiumsupport/knowledge-center/ec2-recover-ip-address/
Hope this helps
Using EIP is the only way to preserve the Public IP, please see this link for detail description: https://aws.amazon.com/premiumsupport/knowledge-center/ec2-recover-ip-address/
Agreed, but I don't need this Instance to have a preserved public IP. I'm happy with the "Auto-assign public IP". how do I set Auto-assign public IP on the restored Instance?
Note this statement: "The public IP addressing feature is only available during launch. However, whether you assign a public IP address to your instance during launch or not, you can associate an Elastic IP address with your instance after it's launched" Reference: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html
Additionally please make sure this setting "Enable auto-assign public IPv4 address" is enabled for the subnet where the instance is launched. Reference: https://docs.aws.amazon.com/vpc/latest/userguide/working-with-subnets.html (See the section: Modify the public IPv4 addressing attribute for your subnet)
Relevant questions
Public ip address connectivity in AWS
asked 5 months agoAWS Nitro Enclave instance does not have public ipv4 address
asked 3 months agoFailing to launch test/cutover instance with public IP
asked 6 months agoEC2 instance in private subnet shows IPv4 address of NAT instance
asked 3 years agoEC2 instance doesn't get a new public IP after Elastic IP is disassociated
asked 2 months agoCan't ssh to EC2 after assigning an additional public ip(elastic ip)
asked 6 months agoUnable to connect to EC2 instance using Public IP address with ssh
asked 2 years agoENI and public IP address
asked 3 years agoRestoring an EC2 Instance - the Public IP is missing
Accepted Answerasked 11 days agoAbout dynamic change of IP address
asked 2 months ago
The newly restored Instance does not have a public IP, even after I stop and start the instance. I do not want to use EIP, the original server did not use EIP.