2개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
0
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
0
Thank you! This helped me now as well. Agreed with Dan, there should be some option when restoring the instance to specify the public IP setting, or a link to update the subnet settings.
답변함 일 년 전
관련 콘텐츠
- AWS 공식업데이트됨 일 년 전
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.
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)