AWS Certified DevOps Engineer - Professional Exam: Troubleshooting EC2 Instances and Application Issues with Nginx and Web Application

Detecting the Underlying Cause of Technical Issues in EC2 Instances and Applications

Prev Question Next Question

Question

You have a set of EC2 Instances hosting an nginx server and a web application that is used by a set of users in your organization.

After a recent application version upgrade, the instance runs into technical issues and needs an immediate restart.

This does not give you enough time to inspect the cause of the issue on the server.

Which of the following options if implemented prior to the incident would have assisted in detecting the underlying cause of the issue?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - D.

The AWS documentation mentions the following.

You can publish log data from Amazon EC2 instances running Linux or Windows Server, and logged events from AWS CloudWatch.

CloudWatch Logs can consume logs from resources in any region, but you can only view the log data in the CloudWatch console in the regions where CloudWatch Logs is supported.

Option A is invalid as detailed monitoring will only help us to get more information about the performance metrics of the instances, volumes etc and will not be able to provide full information regarding technical issues.

Option B is incorrect if we had created a snapshot prior to the update it might be useful but not after the incident.

Option C is incorrect here we are dealing with an issue concerning the underlying application that handles the data so this solution will not help.

For more information on Cloudwatch logs, please refer to the below link:

http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/StartTheCWLAgent.htm

The best option to detect the underlying cause of the issue is D. Install Cloudwatch logs agent on the instance and send all the logs to Cloudwatch logs.

Option A is incorrect because enabling detailed monitoring and checking Cloudwatch metrics only provides performance and utilization data for the instance and does not provide information on the cause of the issue.

Option B is incorrect because creating a snapshot of the EBS volume after restart and attaching it to another instance is a good option for troubleshooting data loss issues, but it does not help diagnose technical issues on the server.

Option C is incorrect because streaming all the data to Amazon Kinesis and analyzing the data in real-time is an option for monitoring and processing real-time data streams, but it may not help diagnose technical issues on the server.

Option D is the best choice because it installs the Cloudwatch logs agent on the instance and sends all the logs to Cloudwatch logs. This allows for easy analysis of the logs to detect the underlying cause of the issue. With the logs in Cloudwatch, it is possible to perform searches and filter logs based on a specific time range, which can help narrow down the issue and pinpoint the cause. It can also help identify patterns or trends that may be indicative of a larger issue. This option is the best choice for quickly identifying the root cause of the issue and minimizing downtime.