it cannot be accessed through port 80 or 443 of the public IP, but it can be accessed normally through the private IP.

0

After my EC2 instance is started, it cannot be accessed through port 80 or 443 of the public IP, but it can be accessed normally through the private IP. After restarting the instance and changing the public IP address, it starts to work normally and cannot be accessed after a few minutes. I checked the security group and status in EC2 and found no exception. What's the reason?Thank you

1 Answer
0

It sounds like you're launching your instance in a private subnet (which doesn't have a default route to an Internet Gateway); but if that was the case then access via the public IP wouldn't work at all.

If there was "something" modifying the VPC route tables you might see the behaviour you're describing.

Are you using WAF in CloudFront or on an Application Load Balancer with managed rules or rules that are dynamically being modified by Lambda? That would block traffic in some circumstances.

The other situation is if you're inspecting traffic using Network Firewall or Gateway Load Balancer and the firewalls are blocking traffic.

You haven't mentioned any of these things so I assume that you're not using them.

The best path is to create a support case and have the team look at your network for you.

profile pictureAWS
EXPERT
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions