ANS-C01 Question 108
Select 3You are designing a monitoring solution for a critical application running on Amazon EC2 instances in a VPC. The application logs are stored locally on the instances, and you need real-time visibility into errors and performance metrics. Additionally, you want to trigger automated remediation actions when specific thresholds are breached. Which combination of steps should you take to achieve this?
- A
Install the CloudWatch Agent on the EC2 instances and configure it to collect custom metrics and logs.
- B
Set up Amazon CloudWatch Alarms to monitor specific metrics and trigger AWS Lambda functions for automated remediation.
- C
Create a CloudWatch Dashboard to visualize the application's logs and metrics in real time.
- D
Enable VPC Flow Logs and deliver them to CloudWatch Logs for real-time application monitoring.
- E
Use CloudWatch Logs Insights to query and analyze application logs for performance and error patterns.
Show answer and explanation
Correct answers: A, B, E
Explanation
To achieve real-time visibility and automated remediation for an application running on EC2, you need to collect logs and metrics using the CloudWatch Agent, monitor them using CloudWatch Alarms, and analyze the logs with CloudWatch Logs Insights. CloudWatch Dashboards and VPC Flow Logs, while useful in other scenarios, do not directly meet the requirements of this use case.
- A. Correct.
Installing the CloudWatch Agent is necessary to collect custom metrics and logs from the EC2 instances. This provides the foundational visibility needed for monitoring.
- B. Correct.
Setting up CloudWatch Alarms allows you to monitor specific application metrics and take automated actions, such as invoking a Lambda function for remediation when thresholds are breached.
- C. Incorrect.
While CloudWatch Dashboards are useful for visualizing metrics, they do not directly help with real-time log analysis or automated remediation.
- D. Incorrect.
Enabling VPC Flow Logs provides network-level visibility but does not directly address application log collection or performance metrics.
- E. Correct.
CloudWatch Logs Insights enables querying and analyzing logs for identifying patterns and troubleshooting application errors, which is critical for real-time visibility.