Nani
Nani

Reputation: 117

can't find /var/log/cloud-init-output.log on redhat ec2 instance

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.

Upvotes: 2

Views: 2487

Answers (1)

Aaron
Aaron

Reputation: 462

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.

Upvotes: 1

Related Questions