Interview Prep/AWS/EC2, Auto Scaling and Load Balancing

User data script ran but the app is not installed. How do you debug a new launch template?

IntermediateScenarioEC2, Auto Scaling and Load Balancing
Answer

Situation read → User data runs once at first boot as root through cloud-init, and failures are silent unless you look.

What I'd do →

  1. SSM into the instance and read /var/log/cloud-init-output.log
  2. Run cloud-init status --long
  3. Check the script has a shebang and set -euxo pipefail
  4. Verify the instance has outbound access for package repositories
  5. Fix the template and refresh

Why → Most user data failures are no network path or a missing shebang.

Interview tip → Better: bake an AMI with EC2 Image Builder so boot does less.

aws All AWS questions Roadmap: AWS core services

More on EC2, Auto Scaling and Load Balancing