2
votes

I usually work on amazon linux ec2 instance and i check /var/log/cloud-init-output.log to see if my cloudformation user data script is working or not. I can't find cloud-init-output.log on redhat ec2 instance and i am not sure where to check the logs and how to make sure that my user data script is working properly.

1

1 Answers

1
votes

Josh answered this here: https://stackoverflow.com/a/50258755/5775568

TL;DR: Run this command from your EC2 instance to see your logs:

sudo grep cloud-init /var/log/messages

For posterity: I also needed to take this approach to see user-data logs on my centos7 EC2 instance.