A new EC2 instance in a "public" subnet can't be reached over SSH from the internet; the SG allows port 22 from your IP.
BeginnerTroubleshootingCloud networking: VPC, firewalls, NAT, VPN and proxies
Answer
Likely causes → The instance has no public IPv4 (subnet doesn't auto-assign and none was requested), the subnet's route table has no 0.0.0.0/0 → igw-xxxx, a NACL blocks it, or your IP changed.
Diagnose →
aws ec2 describe-instances --instance-ids <id> \
--query 'Reservations[0].Instances[0].[PublicIpAddress,SubnetId]'
aws ec2 describe-route-tables --filters Name=association.subnet-id,Values=<subnet-id>
curl -s https://checkip.amazonaws.com
Use VPC Reachability Analyzer from the IGW to the ENI on port 22 for a definitive answer.
Fix → Attach an Elastic IP or enable auto-assign public IP, add the IGW route, fix the NACL, update the SG with your current IP.
Prevent → Prefer SSM Session Manager over public SSH entirely; no inbound port, no public IP needed.
More on Cloud networking: VPC, firewalls, NAT, VPN and proxies
An EC2 instance in a private subnet hangs on `apt-get update` at `Connecting to archive.ubuntu.com`.BeginnerThe SG allows inbound 443 and the app works from inside the VPC, but internet clients time out. The subnet NACL allows inbound 443.IntermediateA VPC peering connection is `Active`, but instances in the two VPCs can't ping each other.BeginnerALB targets are `unhealthy` with reason `Target.Timeout`, and VPC Flow Logs show `REJECT` from the ALB's IPs to the instances.BeginnerTwo VPCs are attached to a Transit Gateway, but traffic between them fails.IntermediateAn AWS Site-to-Site VPN tunnel stays `DOWN`, and the on-prem firewall logs show `NO_PROPOSAL_CHOSEN`.Intermediate