2

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.

PrasadK
  • 778
  • 6
  • 17
Nani
  • 117
  • 1
  • 12

1 Answers1

1

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.

Aaron
  • 412
  • 1
  • 7
  • 11