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
bash
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
Enable CloudWatch Logs
bash
eb logs --cloudwatch-logs enable
Environment Events
bash
eb events eb events --follow # Follow events live
Platform-Specific Log Paths (via SSH)
- •Node.js:
/var/log/web.stdout.log,/var/log/web.stderr.log - •Python:
/var/log/web.stdout.log,/opt/python/log/ - •Docker:
/var/log/eb-docker/containers/ - •Java:
/var/log/tomcat/catalina.out
Composability
- •Diagnose issues from logs: Use
troubleshootskill - •Check environment health: Use
statusskill - •Deploy code: Use
deployskill