ANS-C01 practice question 18 of 35

A company has deployed a web application on AWS. The web application uses an Application Load Balancer (ALB) across multiple Availability Zones. The…

Full set: 291 questions
A company has deployed a web application on AWS. The web application uses an Application Load Balancer (ALB) across multiple Availability Zones. The targets of the ALB are AWS Lambda functions. The web application also uses Amazon CloudWatch metrics for monitoring. Users report that parts of the web application are not loading properly. A network engineer needs to troubleshoot the problem. The network engineer enables access logging for the ALB. What should the network engineer do next to determine which errors the ALB is receiving?
Answer options
A: Send the logs to Amazon CloudWatch Logs. Review the ALB logs in CloudWatch Insights to determine which error messages the ALB is receiving.
B: Configure the Amazon S3 bucket destination. Use Amazon Athena to determine which error messages the ALB is receiving. Correct answer
C: Configure the Amazon S3 bucket destination. After Amazon CloudWatch Logs pulls the ALB logs from the S3 bucket automatically, review the logs in CloudWatch Logs to determine which error messages the ALB is receiving.
D: Send the logs to Amazon CloudWatch Logs. Use the Amazon Athena CloudWatch Connector to determine which error messages the ALB is receiving.
Correct Answer:
B. Configure the Amazon S3 bucket destination. Use Amazon Athena to determine which error messages the ALB is receiving.
Explanation

Application Load Balancer (ALB) access logs are delivered to an Amazon S3 bucket, not directly to Amazon CloudWatch Logs. The most direct and efficient next step for troubleshooting is to query these logs in place. By configuring the S3 bucket as the destination, the engineer can immediately use Amazon Athena to run standard SQL queries against the log files. This allows for powerful, ad-hoc analysis to filter for error status codes (e.g., 5xx), identify problematic Lambda targets, and examine fields like targetprocessingtime or lambdaerrorreason to diagnose the issue without moving data or setting up complex pipelines.

Why Incorrect

A. ALBs cannot send access logs directly to CloudWatch Logs. This option describes an invalid data path for ALB access logging.
C. CloudWatch Logs does not automatically pull data from S3. This would require a custom solution, making it inefficient for immediate troubleshooting.
D. This is an incorrect application of services. Athena queries the S3 logs directly; the CloudWatch Connector is for querying logs already in CloudWatch Logs.

References

1. AWS Documentation. (2023). User Guide for Application Load Balancers - Access logs for your Application Load Balancer. AWS. Retrieved from https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-access-logs.html (See section "Access log files" which specifies Amazon S3 as the destination).

2. AWS Documentation. (2023). User Guide for Application Load Balancers - Querying Application Load Balancer logs. AWS. Retrieved from https://docs.aws.amazon.com/elasticloadbalancing/latest/application/log-analysis.html (This page provides a step-by-step guide for using Amazon Athena to analyze ALB logs stored in S3).

3. AWS Documentation. (2023). User Guide for Application Load Balancers - Access log entries. AWS. Retrieved from https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-access-logs.html#access-log-entry-format (Details the log fields, including targetstatuscode and lambdaerrorreason, which are critical for this troubleshooting scenario).

Scroll to Top