Did your EC2 machine stop and restart or did it hibernate? In those cases, a new public IP address would have been assigned. If you want the public IP addresses not to change you should get Elastic IPs. Refer to this documentation - https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/using-instance-addressing.html
A public IP address is assigned to your instance from Amazon's pool of public IPv4 addresses, and is not associated with your AWS account. When a public IP address is disassociated from your instance, it is released back into the public IPv4 address pool, and you cannot reuse it.
You cannot manually associate or disassociate a public IP (IPv4) address from your instance. Instead, in certain cases, we release the public IP address from your instance, or assign it a new one:
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.
We release your instance's public IP address when you associate an Elastic IP address with it. When you disassociate the Elastic IP address from your instance, it receives a new public IP address.
If the public IP address of your instance in a VPC has been released, it will not receive a new one if there is more than one network interface attached to your instance.
If your instance's public IP address is released while it has a secondary private IP address that is associated with an Elastic IP address, the instance does not receive a new public IP address.
If you require a persistent public IP address that can be associated to and from instances as you require, use an Elastic IP address instead.
If my answer resolved your issue, please upvote and accept my answer. Thanks
Hi , there can be multiple reasons.
- Check your instance is in public subnet and route table in the subnet has igw there is no block in acl as well as in sg
- Sometime some isp having routing issue, check with other isp/mobile internet
- Check if any internal firewall /rule/av is blocking or blacklisted your ip.
- Check if any external firwall/waf has blacklisted the ip .
Unable to access EC2 Instance over the Public IP Addressasked 5 months ago
EC2 instance created with public IP, but unable to access over HTTPasked 18 days ago
IP Address Assigned to EC2 Instanceasked 3 days ago
Restoring an EC2 Instance - the Public IP is missingAccepted Answerasked 5 months ago
Unable to access Spring Boot application deployed on AWS EC2 instance (Windows Server 2022)asked 5 months ago
Unable to connect to EC2 instance using Public IP address with sshasked 3 years ago
How Soon Can External Access be possible to My EC2 Instance Public IP Addressasked 5 months ago
EC2 instance is not reachable by public IPAccepted Answerasked 3 years ago
No matter how I create an ec2 instance, I can't connect to it over it's public IPAccepted Answerasked 4 months ago
whitelist international ip address, but unable to access rds MYSQLasked 6 months ago