ofoklq
Last Updated: February 25, 2016
·
2.96K
· raulraja

Quickly access AWS Elastic Beanstalk Tomcat Logs

Add this function to ~/.bash_profile

function beanstalk_log { 
    ssh -i /path/to/key.pem  ec2-user@$1 tail -n 500 -f /opt/tomcat7/logs/catalina.out
}

Then normally access server logs with the node public dns

beanstalk_log ecX-XX-XX-XXX-XXX.compute-X.amazonaws.com