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 →
- SSM into the instance and read
/var/log/cloud-init-output.log - Run
cloud-init status --long - Check the script has a shebang and
set -euxo pipefail - Verify the instance has outbound access for package repositories
- 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.