Interview Prep/Real-World Interview/Cloud provider issues

One EC2 instance stops responding to SSH and the console shows "Instance reachability check failed" while the system check passes.

BeginnerTroubleshootingCloud provider issues
Answer

Likely causes → The problem is inside the instance's OS: a kernel panic, a full root disk, exhausted memory, a broken network configuration after an update, or a bad fstab entry blocking boot. (A failed system status check would point to AWS hardware.)

Diagnose →

aws ec2 describe-instance-status --instance-ids $ID
aws ec2 get-console-output --instance-id $ID --latest --output text | tail -50
aws ec2 get-console-screenshot --instance-id $ID

Fix → Reboot first. If it doesn't come back, use EC2 Serial Console to fix it, or stop the instance, attach the root volume to a rescue instance, repair (fstab, disk space), and reattach. For instances in an ASG, terminating and letting the ASG replace it is fastest.

Prevent → Treat instances as replaceable (ASG with health checks), alarm on StatusCheckFailed_Instance, and keep nofail on non-root fstab entries.

All Real-World Interview questions Roadmap: Interview readiness

More on Cloud provider issues