Friday, May 20, 2022

How to check whether my user data passing to EC2 instance is working | AWS EC2 bootstrap script log

The cloud-init output log file (/var/log/cloud-init-output.log) captures console output so it is easy to debug your scripts following a launch if the instance does not behave the way you intended.

Check the Logs in EC2 instance

Login to EC2 instance, and type the below command:

tail -f /var/log/cloud-init-output.log

This will give the output of bootstrap execution

1 comment:

  1. what use of this sir?? userdata means we will provide some commands while provisoning ec2 right?

    ReplyDelete

Master DevSecOps and Multi Cloud Computing Course by Coach AK | DevSecOps and Cloud Computing Online Classes | March 2026 Schedule

  Live Hands-On Bootcamp - March 2026 🚀 Supercharge your DevOps career with real-world skills! 🔥 What You’ll Learn 👉 Master leading DevSe...