Interview Prep/Real-World Interview/Cloud provider issues

You stopped and started an EC2 instance for maintenance, and now the site at its DNS name doesn't load.

BeginnerTroubleshootingCloud provider issues
Answer

Likely causes → The instance had an auto-assigned public IPv4 address, which changes on every stop/start. DNS still points at the old IP, which may now belong to someone else.

Diagnose →

dig +short app.example.com
aws ec2 describe-instances --instance-ids $ID --query 'Reservations[0].Instances[0].PublicIpAddress'

Fix → Allocate an Elastic IP, associate it with the instance, and update the DNS record:

aws ec2 allocate-address --domain vpc
aws ec2 associate-address --instance-id $ID --allocation-id eipalloc-0abc

Prevent → Put public services behind a load balancer and point DNS at it with an ALIAS record, so instance IPs never matter.

All Real-World Interview questions Roadmap: Interview readiness

More on Cloud provider issues