DOP-C02 Question 206
Select 4Your team manages an e-commerce platform running on AWS, and you are responsible for ensuring proper monitoring and logging for compliance and operational insights. The application consists of multiple Amazon EC2 instances behind an Application Load Balancer (ALB) with Amazon RDS as the database. You need to implement a solution to monitor application latency and errors effectively, as well as collect detailed logs for troubleshooting. Which combination of actions should you take?
- A
Enable ALB access logs and store them in an S3 bucket for analysis.
- B
Configure Amazon CloudWatch Logs to capture logs from the EC2 instances using the CloudWatch Logs agent.
- C
Set up Amazon RDS Enhanced Monitoring to capture real-time metrics and send them to CloudWatch.
- D
Use AWS CloudTrail to capture all API requests to the application and store them in an S3 bucket.
- E
Create a CloudWatch dashboard to visualize ALB metrics such as Latency and HTTPCode_ELB_5XX_Count.
Show answer and explanation
Correct answers: A, B, C, E
Explanation
To monitor application latency and errors effectively while collecting logs for troubleshooting, you need to leverage multiple AWS services. ALB access logs provide detailed request-level data, while CloudWatch Logs captures application-level logs from EC2 instances. RDS Enhanced Monitoring gives insights into database performance, and CloudWatch dashboards visualize critical metrics like latency and error counts. While AWS CloudTrail is useful for API activity tracking, it is not directly relevant for monitoring latency and errors.
- A. Correct.
Enabling ALB access logs provides detailed information about requests sent to the load balancer, which is crucial for troubleshooting and analyzing latency or errors.
- B. Correct.
Configuring Amazon CloudWatch Logs with the CloudWatch Logs agent on the EC2 instances allows you to collect application logs for deeper troubleshooting and monitoring.
- C. Correct.
Amazon RDS Enhanced Monitoring provides real-time metrics, helping you monitor database performance and identify bottlenecks. This is essential for a comprehensive monitoring strategy.
- D. Incorrect.
AWS CloudTrail is primarily used for tracking API activity and auditing. While it is important for compliance, it doesn't directly help monitor latency or application errors.
- E. Correct.
Creating a CloudWatch dashboard with relevant ALB metrics like Latency and HTTPCode_ELB_5XX_Count enables real-time monitoring of application performance and error rates.