How to check whether my user data passing to EC2 instance working or not?

Pravin picture Pravin · Apr 9, 2013 · Viewed 50k times · Source

While creating new AWS EC2 instance using EC2 command line API, i am passing some user data to new instance.

Now how i came to know whether that user data executed or not ?

How should i check it ?

Answer

Ravi Prajapati picture Ravi Prajapati · Sep 8, 2015

You can verify using following steps

  1. SSH on launch EC2 instance
  2. Check log of your user data script in
    • /var/log/cloud-init.log and
    • /var/log/cloud-init-output.log

You can see all log's of your user data script and it will also create /etc/cloud folder.