AWS Certified Solutions Architect – Professional — Question 597

For Amazon EC2 issues, while troubleshooting AWS CloudFormation, you need to view the cloud-init and cfn logs for more information. Identify a directory to which these logs are published.

Answer options

Correct answer: C

Explanation

On Amazon EC2 Linux instances, both cloud-init logs (such as cloud-init.log and cloud-init-output.log) and AWS CloudFormation helper script logs (such as cfn-init.log and cfn-wire.log) are written to the standard /var/log/ directory. The other options represent either non-existent paths or, in the case of /var/log/lastlog, a specific system file used for tracking user login sessions rather than application logs.