SOA-C02 Question 2
Select 3You are managing an application running on Amazon EC2 instances behind an Application Load Balancer (ALB). Users report intermittent 5xx errors when accessing the application. You want to determine the root cause of these errors and monitor the application for further issues. Which combination of actions should you take to troubleshoot and monitor this issue?
- A
Enable access logs for the Application Load Balancer and analyze them using Amazon Athena.
- B
Configure detailed monitoring for the EC2 instances and review their CPU utilization metrics in Amazon CloudWatch.
- C
Use AWS CloudTrail to track the API calls made to the Load Balancer.
- D
Set up a CloudWatch alarm to notify you when the ALB's HTTP 5xx error count metric exceeds a threshold.
- E
Enable VPC Flow Logs to capture traffic between the ALB and the EC2 instances.
Show answer and explanation
Correct answers: A, B, D
Explanation
To troubleshoot and monitor intermittent 5xx errors, you need to focus on collecting relevant data from the Application Load Balancer and EC2 instances. ALB access logs provide detailed information about requests and errors, while EC2 detailed monitoring helps identify resource issues. Additionally, setting up a CloudWatch alarm on the ALB's HTTP 5xx error count ensures you are alerted in real-time if the issue persists or worsens. Other options like CloudTrail and VPC Flow Logs are not directly relevant to this specific problem.
- A. Correct.
Enabling ALB access logs allows you to capture details about the requests handled by the ALB, including details about errors. Analyzing these logs with Amazon Athena can provide insights into the root cause of the 5xx errors.
- B. Correct.
Detailed monitoring for EC2 instances provides more granular metrics, such as CPU utilization, which can help identify if the EC2 instances are under resource pressure.
- C. Incorrect.
AWS CloudTrail tracks API calls to AWS services but does not provide insights into the application-level errors or HTTP 5xx error metrics. It is not relevant for this scenario.
- D. Correct.
Setting up a CloudWatch alarm on the ALB's HTTP 5xx error count is critical for proactive monitoring and alerts when errors increase, allowing you to respond quickly.
- E. Incorrect.
VPC Flow Logs capture traffic at the network level, but they do not provide insights into HTTP 5xx errors or application-level issues that the ALB and CloudWatch metrics can reveal.