Lesson 3 of 5 Network Troubleshooting and Monitoring

Interpreting Load Balancer, WAF and Container Logs

This lesson explains how the application-level logs that the exam guide names, ELB access logs, AWS WAF logs, CloudFront logs and container logs, show what happened to requests above the IP layer.

Learning outcomes

After completing this lesson, you will be able to:

  • Interpret ELB access and connection logs.
  • Interpret WAF logs and container logs.
  • Query logs with Athena.

ELB access and connection logs

ALB access logs, disabled by default, are delivered to an S3 bucket every five minutes; the bucket policy must allow the Elastic Load Balancing log delivery principal for the Region. Each entry contains the request time, client IP and port, target IP and port, request_processing_time, target_processing_time, response_processing_time, elb_status_code, target_status_code, bytes, request line, user agent, TLS cipher and protocol, target group ARN, trace ID and error reason fields. A value of -1 in a processing time or a dash for the target status means the load balancer could not complete the exchange with the target. Connection logs record TLS handshake details and client certificate information, and health check logs record each target check. NLB access logs record TLS connections only.

Scenario questions

Reading access logs

Exam skills 5.3.2 · 2.2.1

Interpret ALB access log entries.

Log in to try this activity Interactive activities are free with an account.

WAF logs and container logs

AWS WAF logs show, for each inspected request, the terminatingRuleId, action, labels, rule group matches, rate-based rule details and the HTTP request headers, which explains why a client was blocked or challenged. Container logs from the awslogs driver or FireLens show application-level connection errors, such as DNS resolution failures for service discovery names, timeouts to dependencies or TLS errors, and ECS task network configuration in awsvpc mode gives each task its own ENI that appears in VPC Flow Logs. On EKS, CoreDNS logs and VPC CNI logs help with pod networking problems.

LogDestinationShows
VPC Flow LogsCloudWatch Logs, S3, FirehoseIP-level ACCEPT/REJECT per ENI
ALB access logsS3Request timings and ELB/target status codes
AWS WAF logsCloudWatch Logs, S3, FirehoseTerminating rule and action per request
CloudFront logsCloudWatch Logs, S3, Firehose (v2); Kinesis (real time)Edge result type, status, latency
Container logsCloudWatch Logs (awslogs, FireLens, Fluent Bit)Application connection errors
Resolver query logsCloudWatch Logs, S3, FirehoseDNS queries and responses from VPCs
Worked example

504 errors only for one path

Users report timeouts on /reports/export. Athena queries over ALB access logs show elb_status_code 504 with target_processing_time of -1 and request durations of exactly 60 seconds, while other paths succeed. The ALB's idle timeout is 60 seconds and report generation takes up to 90. Container logs show the exports complete successfully after the ALB has already closed the connection. The team raises the idle timeout to 120 seconds for now and plans to make exports asynchronous.

Check yourself

Where are ALB access logs delivered?

Show answer

To an S3 bucket.

Exam Tips

Remember for the exam

  • ALB access logs go to S3 and show ELB and target status codes and processing times.
  • target_processing_time -1 and target status '-' mean the target did not respond in time.
  • WAF logs show the terminating rule for blocked requests.
  • Container logs reveal application-level DNS, timeout and TLS errors.