While creating new AWS EC2 instance using the EC2 command line API, I am passing some user data to the new instance.
Now how I came to know whether that user data executed or not?
How should I check it?
Follow these steps to verify:
1. SSH on the launch EC2 instance
2. You can check the log of your user data script in these paths:
Now, you can see all of your log’s of user data script. A /etc/cloud directory will also be created.