ALB targets are `unhealthy` with reason `Target.Timeout`, and VPC Flow Logs show `REJECT` from the ALB's IPs to the instances.
BeginnerTroubleshootingCloud networking: VPC, firewalls, NAT, VPN and proxies
Answer
Likely causes → The instance SG doesn't allow traffic from the ALB on the target/health check port. Often the SG allows only 0.0.0.0/0:443 while the app listens on 8080, or it references the wrong SG.
Diagnose →
aws elbv2 describe-load-balancers --names <alb> --query 'LoadBalancers[0].SecurityGroups'
aws ec2 describe-security-groups --group-ids <instance-sg> --query 'SecurityGroups[0].IpPermissions'
Fix → Allow the target port (and health check port if different) from the ALB's security group:
aws ec2 authorize-security-group-ingress --group-id <instance-sg> \
--protocol tcp --port 8080 --source-group <alb-sg>
Prevent → Always reference the LB SG rather than CIDRs; manage both in one module.
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`.BeginnerA new EC2 instance in a "public" subnet can't be reached over SSH from the internet; the SG allows port 22 from your IP.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.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