Logs & Events
Retrieve application logs, stream live logs, enable CloudWatch logging, and view environment events using the EB CLI.
When to Use
- View application logs
- Stream logs in real time
- Enable CloudWatch log integration
- Check environment events
- Find platform-specific log file paths
When NOT to Use
- Interpreting errors and fixing issues → use
troubleshootskill - Checking health status → use
statusskill - Deploying code → use
deployskill
Recent Logs
eb logs
eb logs <env-name>
eb logs --all # All log files
eb logs --stream # Stream logs live (Ctrl+C to stop)
eb logs --zip # Download complete log bundle
eb logs --instance <id> # Logs from specific instance
eb logs -g <log-group> # Specific CloudWatch log group
Enable CloudWatch Logs
eb logs --cloudwatch-logs enable
Environment Events
eb events
eb events --follow # Follow events live
Platform-Specific Log Paths (via SSH)
AL2/AL2023 (current platforms):
- Node.js:
/var/log/web.stdout.log,/var/log/web.stderr.log - Python:
/var/log/web.stdout.log,/var/log/web.stderr.log - Docker:
/var/log/eb-docker/containers/eb-current-app/*.log - Java (Corretto):
/var/log/web.stdout.log,/var/log/web.stderr.log - Java (Tomcat):
/var/log/tomcat/catalina.out - Go:
/var/log/web.stdout.log,/var/log/web.stderr.log - Ruby:
/var/log/web.stdout.log,/var/log/web.stderr.log - PHP:
/var/log/web.stdout.log,/var/log/web.stderr.log - .NET:
/var/log/web.stdout.log,/var/log/web.stderr.log
Common EB platform logs:
/var/log/eb-engine.log— EB deployment engine log/var/log/eb-hooks.log— Platform hook execution log/var/log/nginx/access.log,/var/log/nginx/error.log— Reverse proxy logs
Composability
- Diagnose issues from logs: Use
troubleshootskill - Check environment health: Use
statusskill - Deploy code: Use
deployskill
Additional Resources
Converted and distributed by TomeVault — claim your Tome and manage your conversions.