ALB Access Logs and Monitoring
What you'll learn: How to capture detailed request data from your Application Load Balancer and monitor its health and performance.
When traffic flows through your ALB, wouldn't it be helpful to see exactly what's happening? Access logs and monitoring give you that visibility—like installing security cameras and sensors in a building to track who enters, when, and where they go.
What Are ALB Access Logs?
Access logs are detailed records of every request your ALB receives. Each log entry captures:
- Client IP address and port
- Request timestamp
- Request URL and HTTP method
- Response status code and processing time
- Target IP (which backend server handled it)
- SSL/TLS details
These logs are stored in an S3 bucket you specify, creating a permanent audit trail.
Why Enable Access Logs?
Think of access logs as your ALB's flight recorder. They help you:
- Debug issues: Track down failed requests or slow responses
- Analyze traffic patterns: Understand peak times and popular endpoints
- Security investigations: Identify suspicious activity or attack patterns
- Compliance: Meet regulatory requirements for request logging
Monitoring Your ALB
Beyond logs, you'll integrate with monitoring services to track real-time metrics:
- Active connection counts
- Request rates per minute
- Target response times
- HTTP error codes (4xx, 5xx)
- Healthy vs unhealthy target counts
This monitoring acts like a dashboard in your car—giving you instant visibility into performance and alerting you when something's wrong.
Practical Use
You enable access logs by pointing your ALB to an S3 bucket. Logs arrive within minutes and can be analyzed with queries or visualization tools. Monitoring metrics update every minute, letting you set alarms for abnormal conditions.
Key Takeaway: ALB access logs provide detailed forensic records of every request, while monitoring services offer real-time visibility into performance and health—together they form your complete observability solution.